Image slider in asp.net
hi friends,can anyone me with the code for image slider.i am having all my images in a folder so i need to get images from folder.
protected void Timer1_Tick(object sender, EventArgs e)
{
SetImageUrl();
}
private void SetImageUrl()
{
Random _rand = new Random();
int i = _rand.Next(1, 3);
Image1.ImageUrl = "~/Images/" + i.ToString() + ".jpg";
}
<asp:Timer ID="Timer1" runat="server" Interval="1000" OnTick="Timer1_Tick">
</asp:Timer>
<asp:Image Style="width: 1000px; height: 500px;" ID="Image1" runat="server" />
i am using this to get the images but its not working properly.
i need a your help with coding.