What Are The Difference Between AutoEventWireup="true" and
AutoEventWireup="False"

Answer Posted / kapil sharma

Dont be too confuse in this question for understand

actually AutoEventWireup is written in page directive like
this

<%@ Page Language="C#" AutoEventWireup="true"
CodeFile="Default2.aspx.cs" Inherits="Default2" %>

by default it is "true", that means all the events that are
automatically rises when page is loading


if AutoeventWireUp=false then we have to manually write
events and delegates like this




public _Default() // ctor
{
Load += new EventHandler(Page_Load);
PreInit += new EventHandler(Page_PreInit);
}

protected void Page_Load(object sender, EventArgs e)
{
// ...
}

protected void Page_PreInit(object sender, EventArgs e)
{
// ...
}
So by default its means all event automatically wire up
when page load and if its false we have do some extra
work....

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can you implement encapsulation in asp.net?

11690


From which base class all web forms are inherited?

599


List of words of preprocessor in .net?

603


How to handle errors in Web API?

735


What is semantic gap?

723






Why asp.net is better than php?

580


Which library is used by the testers and developers to develop automated tests and create testing tools?

625


What is asp.net used for?

689


How do you do Client-side validation in .Net?

681


Differentiate between globalization and localization.

632


how can create login from create and written conde in asp.net

1862


What is application variable in asp.net?

532


Why we are using mvc instead of asp.net? : Asp.Net MVC

603


What is difference between web api and web services?

623


How can we secure the data which is send from client side to server? Like the login id and paasword needs to be authenticated on the server but we cannot send it in plain text into the server.One more thing we are not using the SSL here.

1536