Image has to be changed rapidly for few seconds continously.

Posted by Gokul under Regular Expressions on 5/12/2011 | Points: 10 | Views : 1848 | Status : [Member] | Replies : 2
Dear Friends
I am develpoing a project where i need to diaplay many images in it. The images should be changing for each 5 seconds in it.How to make possible it?

Thanks and Regards,
GokulNath Nithy.



Responses

Posted by: Lakn2 on: 5/12/2011 [Member] Starter | Points: 25

Up
0
Down
Hi ,
I hope it helps you

<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:Timer ID="Timer1" runat="server" OnTick="gettickvalue" Interval="2000">
</asp:Timer>
<asp:UpdatePanel ID="BannerPanel" runat="server" UpdateMode="Conditional">
<Triggers >
<asp:AsyncPostBackTrigger ControlID="Timer1" EventName="Tick" />
</Triggers>
<ContentTemplate>
<asp:Image ID="imgBanner" ImageUrl="~/images/banner_1.jpg" runat="server"
Height="291px" Width="283px" />
</ContentTemplate>
</asp:UpdatePanel>

in coe behind
protected void gettickvalue(object sender, EventArgs e)
{
Random RandomNumber = new Random();
int n = RandomNumber.Next(1, 8);
imgBanner.ImageUrl = System.String.Concat("images/banner_", n.ToString(), ".jpg");
}

Thanks&Regards
LakshmiNarayana Nalluri.

Gokul, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Nithadeepak on: 5/12/2011 [Member] Bronze | Points: 25

Up
0
Down
please find the code here:http://www.dotnetfunda.com/codes/code1532-a-simple-way-to-slide-images-using-jquery-.aspx

Nitha Deepak

Gokul, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response