You can use below code to generate a new Random number each time.
Random rd = new Random();
Int32 rdNum = rd.Next();
Response.Write(rdNum.ToString());
The .NET Framework allows developers to use the same set of skills to rapidly buid great applications for the web, windows, services and more.
Page life Cycle of an ASP.NET page
Following are the events occur during ASP.NET Page Life Cycle:
1)Page_PreInit
2)Page_Init
3)Page_InitComplete
4)Page_PreLoad
5)Page_Load
6)Control Events
7)Page_LoadComplete
8)Page_PreRender
9)SaveViewState
10)Page_Render
11)Page_Unload
Among above events Page_Render is the only event which is raised by page. So we can't write code for this event.
Subscribe to:
Posts (Atom)