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

Define msil.

551


What is data grid view in asp.net?

535


What is localhost in asp.net?

567


Describe the Server Control Events of ASP.NET?

659


Explain in what order a destructors is called.

581






Explain exception filters?

590


Explain the Order of events in an asp.net page?

606


Explain the use of view state?

564


What is a master page and what does it do?

536


What’s the use of “GLOBAL.ASAX” file?

600


What is ViewState? What does the "EnableViewState" property do? Why would I want it on or off?

662


Do you know about caching with the datasource controls?

486


Does google crawl redirects?

521


What’s the catch?

624


What is autopostback in dropdownlist in asp net?

535