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