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
How can you implement encapsulation in asp.net?
From which base class all web forms are inherited?
List of words of preprocessor in .net?
How to handle errors in Web API?
What is semantic gap?
Why asp.net is better than php?
Which library is used by the testers and developers to develop automated tests and create testing tools?
What is asp.net used for?
How do you do Client-side validation in .Net?
Differentiate between globalization and localization.
how can create login from create and written conde in asp.net
What is application variable in asp.net?
Why we are using mvc instead of asp.net? : Asp.Net MVC
What is difference between web api and web services?
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.