Page Directive in asp.net [Resolved]

Posted by Bhupentiwari under ASP.NET on 7/8/2012 | Points: 10 | Views : 2429 | Status : [Member] | Replies : 4
What is autoeventwireup property of page directive in asp.net ?

Thanks n Regards
Bhupendra Tiwari



Responses

Posted by: Writetopallavi on: 7/9/2012 [Member] Starter | Points: 50

Up
0
Down

Resolved
Hi Bhupendra,

Autoeventwireup is property of @page directive which can be set to true or false.
If set to true : Events for ASP .net pages are automatically connected to event handling functions.
if set to false : Then we have to explicitly bind the event to a method as bellow

protected void Page_Load(object sender, EventArgs e)
{
Response.Write("I am in page load");
}

override protected void OnInit(EventArgs e)
{
this.Load += new EventHandler(this.Page_Load);
}

by default Autoeventwireup property is true


Bhupentiwari, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Bhupentiwari on: 7/9/2012 [Member] Starter | Points: 25

Up
0
Down
Thanx.. i got the difference

Thanks n Regards
Bhupendra Tiwari

Bhupentiwari, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Akiii on: 7/9/2012 [Member] Bronze | Points: 25

Up
0
Down
Good explanation Pallavi .....


Thanks and Regards
Akiii

Bhupentiwari, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Writetopallavi on: 7/9/2012 [Member] Starter | Points: 25

Up
0
Down
Thank you so much to both of you

Bhupentiwari, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response