Click here to Skip to main content
15,888,070 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi to Everybody,

I am using the C#.net 3.5 with asp.net 2.0.

I declare some object above to the page_load event as follows.

C#
DAOLogin.Login objDAOLogin = new DAOLogin.Login();
BLLLogin.Login objBLLLogin = new BLLLogin.Login();
protected void Page_Load(object sender, EventArgs e)
{ }


If i execute the page it will come to the page_load event and finished whatever events are called by the page finally it will auotmatically loop some times to above two lines.

I dont know why it happens..

Please help me resolve this problem..

Thanks a lot to all
Posted

1 solution

Your question is not very clear, but initialization of member variable will happen every time (complete post back or partial post back like update panel). For every post back entire page life cycle runs in which the member variable will be initialized. This happens before post back event.

If you are looking for something else then provide more details on the problem.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900