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
What is difference between or and orelse?
What are the new data controls in asp.net 2.0?
What are ASHX files?
What are the new web part controls in asp.net 2.0 ?
What is the displayafter property in updateprogress control?
What are the authentication types in asp.net?
how to transfer the file from client to server using asp.net
How do you declare static variable? What is its lifetime?
Write a code for sending an email from asp.net application.
Define a static class?
What are directives in asp.net? List down all the important directives.
code for "For every 5days system has to create 1text file with the corresponding date and it has to store in c-drive" by using web applications
what are the web form events available in asp.net?
Give an example of what might be best suited to place in the application_start and session_start subroutines?
How does session work?