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 do you design a website with multilingual support in ASP.NET ?

538


What is the difference between Classic ASP and ASP.Net?

525


What are the differences between the response.write() and response.output.write()?

527


What is the syntax for datagrid and specifying columns?

2086


What do you understand by aggregate dependency?

610






What is a web api endpoint?

527


What is the flow of processing of the request? : asp.net mvc

506


there is two functions function a and function b like fun a(){.... ..... } fun b() { } in function b i write the coding to add two numbers and i need to dispaly the sum result in function a with out using global variable. how we do?

2220


How can we implement a identity (sql server) call in an asp.net page?

550


How can u deifne the benefits and limitation of using Viewstate for state management?

700


Why will you usually create an aspnet user account in the database for an asp.net web application?

531


Is asp.net free?

551


if i wanna deploy my asp.net project to the production server and situation is that i m still not compiled my project i have as-is on my development side now on production server we dont have a visual studio now what kind of settings i need to be to do in webconfig /machine.config file to deploy my project and in iis too....

1595


What is the difference between union and join?

560


how to transfer the file from client to server using asp.net

583