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

Answer Posted / uma

Dont read all the those things simply 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)
{
// ...
}

Is This Answer Correct ?    20 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do we assign page-specific attributes?

705


Why cyclomatic complexity is important?

646


How does the iis work?

647


What is windows active directory authentication?

652


How will you do windows authentication and what is the namespace? If a user is logged under integrated windows authentication mode, but he is still not able to logon, what might be the possible cause for this? In ASP.Net application how do you find the name of the logged in person under windows authentication?

640






What is an imagemap in asp.net?

636


What is server infrastructure & server components?

859


What is the difference between session and viewstate?

589


How can you identify that the page is post back?

654


What is rending process in ASP.NET?

705


What is the difference between web config and machine config files?

648


Explain the server control events of asp.net ?

631


What is _viewstart?

585


How does session id work?

589


What is the namespace to create thread in .net?

605