Click here to Skip to main content
15,906,816 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Sir
when I run my page each and every time page_load event is fiering.By which I could not access my page.
I have written:-

C#
protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            try
            {
                //My Code
            }
            catch(Exception ex)
            {
                Session["error"] = ex.Message;
            }

        }
    }


without using any control of my page it is automatically calling the page_load event.

Please Help Me.

Thanks.
Posted
Updated 5-Jan-12 18:58pm
v2
Comments
Karthik Harve 6-Jan-12 0:47am    
Ofcourse when the page post backs, page load event will fire. what do you mean that you cannot access your page..??? explain more on the problem..
JBSAHU 6-Jan-12 0:57am    
means without using any control of my page it is automatically calling the page load event.
sriman.ch 6-Jan-12 1:10am    
what do you mean by without using any control ? Page load events fires by default ....
JBSAHU 6-Jan-12 1:17am    
I mean To Say in every second page load is calling automatically.
I have not use any timer control.
[no name] 6-Jan-12 1:24am    
hey means when your page is post back by default it will call your page load method.
its life cycle .

1 solution

If your question is your page is calling automatically without calling.

1) Please check any timer is there which calling your page with an interval.

2) If you are using master page then check the code may be your master page calling your page.
 
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