Look:
- Take scriptmanager control.
- Take UpdatePanel control.
- Take Timer control, set 1000 in interval property.
- Take Label control.
- Place the Timer, Label in updatepane
In timer1_tick event type the following:
- Label1.Text=DateTime.Now.ToString();
-
-
- Page_load()
- {
- if (! Page.IsPostBack)
- {
- Session["a"]=0;
- }
- }
-
-
- string[] p={"blue hills.jpg","winter.jpg","sunset.jpg"};
- int b=Convert.ToInt32(Session["a"]);
- Image1.ImageUrl=p[b];
- b++;
- if (b==3)
- Session["a"]=0;
- else
- Session["a"]=b;