Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

Answers were Sorted based on User's Feedback



What Are The Difference Between AutoEventWireup="true" and AutoEventWireup="False&q..

Answer / vishnu prasad.c

When you set the value of the AutoEventWireup attribute to
false, you must manually hook up events to event handlers.

When you set the value of the AutoEventWireup attribute to
true, the ASP.NET page framework can automatically raise
events.

Is This Answer Correct ?    39 Yes 5 No

What Are The Difference Between AutoEventWireup="true" and AutoEventWireup="False&q..

Answer / 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

What Are The Difference Between AutoEventWireup="true" and AutoEventWireup="False&q..

Answer / navneet

When you set the value of the AutoEventWireup attribute to
false, you must manually hook up events to event handlers.
such as Page_Load() etc.

When you set the value of the AutoEventWireup attribute to
true, the ASP.NET page framework can automatically raise
events.
such as Page_Load() etc.

Is This Answer Correct ?    21 Yes 3 No

What Are The Difference Between AutoEventWireup="true" and AutoEventWireup="False&q..

Answer / vinodh reddy

The default value for AutoEventWireup is true for a C# web
form, and false for a VB.NET web form. The IDE adds the
default values to the @ Page directive for a new web form.
The difference in defaults is partly because VB.NET has a
mechanism for defining an event handler and subscribing to
an event in one graceful motion (the Handles keyword).


Protected Sub Page_Load(ByVal sender As Object, _
ByVal e As System.EventArgs) _
Handles Me.Load
' ...

End Sub


An easy way to generate the above code is to use the drop
down controls that sit just above the editor. Note: C#
doesn t make the dropdown list of events available when
editing a code-beside file, but the dropdown is available
when writing in-line code.

There is no equivalent to the Handles keyword in C#
(anonymous event handlers are arguably close, but just not
the same). When AutoEventWireup is true, all we need to do
is follow the method naming convention of
Page_EventToHandle. The ASP.NET runtime will automatically
find and fire the method for the appropriate event.


protected void Page_Load(object sender, EventArgs e)
{

}


Once Again, In Reverse
If we switch to AutoEventWireup= true for a VB.NET web
form, we can use the magic Page_EventName approach. The
only change to the earlier VB.NET code would be to drop the
Handles clause, and the events fire correctly.

If we switch to AutoEventWireup= false for a C# web form,
there is a little extra work to do. Somewhere we need to
explicitly wire up events. Here is one approach.


public partial class _Default : Page
{
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 ?    17 Yes 3 No

What Are The Difference Between AutoEventWireup="true" and AutoEventWireup="False&q..

Answer / 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

What Are The Difference Between AutoEventWireup="true" and AutoEventWireup="False&q..

Answer / anil jadhav

here is the proper valid answer
AutoEventWireup attribute
AutoEventWireup is a Boolean attribute that indicates
whether events of a Web Forms page are autowired.The default
value for AutoEventWireup is TRUE.

In Visual Basic .NET or in Visual Basic 2005, the designer
performs this binding using the Handles keyword in the
declaration of the event-handler method.
Private Sub Page_Load(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles MyBase.Load

The ASP.NET page framework supports an alternative mechanism
that uses the AutoEventWireup attribute of a Web Forms page
to automatically associate page events and event-handler
methods. If the AutoEventWireup attribute of the @ Page
directive is set to TRUE (or if it is not specified because
its default value is TRUE), the ASP.NET page framework
automatically calls page event-handler methods.

For example, the Page_Init and Page_Load event-handler
methods are explicitly called by the ASP.NET page framework,
without using the Handles keyword or an explicit event delegate.

Conclusion
When you explicitly set AutoEventWireup to TRUE, Visual
Studio .NET or Visual Studio 2005, by default, generates
code to bind events to their event-handler methods. At the
same time, the ASP.NET page framework automatically calls
the event-handler methods based on their predefined names.

Is This Answer Correct ?    5 Yes 2 No

What Are The Difference Between AutoEventWireup="true" and AutoEventWireup="False&q..

Answer / firoz khan

if the AutoEventWireup="true" than the event of page load automatic genreate
else
genreated by hendler or created him self if u can 

Is This Answer Correct ?    1 Yes 0 No

What Are The Difference Between AutoEventWireup="true" and AutoEventWireup="False&q..

Answer / karthees

AutoEventWireup= true:-)
When value of the AutoEventWireup attribute is set to true, the ASP.NET page framework can automatically raise events.

AutoEventWireup= false:-)
When value of the AutoEventWireup attribute is set to false, one must manually call the events to event handlers.

Is This Answer Correct ?    1 Yes 1 No

What Are The Difference Between AutoEventWireup="true" and AutoEventWireup="False&q..

Answer / meganadha reddy k.

I guess what you mean is AutoPostBack="true" in which the
index change of a drop down box will be posted back to
server.
Please correct me if I am wrong.

To know the difference between autoEventWireup="true" and
autoEventWireup="false" please refer the below link:

http://support.microsoft.com/kb/324151

Regards,
Meganadha Reddy K.

Is This Answer Correct ?    6 Yes 8 No

What Are The Difference Between AutoEventWireup="true" and AutoEventWireup="False&q..

Answer / ruchika garg

First of all the above answer that default value for auto
eventwireup=true is false bcoz the default value of
autoeventwireup=false in c#

A false value indicates that you must explicitly write a
code to bind events related to a page ,such as the load
event of a page

and true value indicates that events will be generated
automatically

Is This Answer Correct ?    1 Yes 9 No

Post New Answer

More ASP.NET Interview Questions

What is bound controls

0 Answers   MCN Solutions,


What setting must be added in the configuration file to deny a particular user from accessing the secured resources?

0 Answers  


Which tools of web site Administartion tool do you use to manage user,roles and rules?

2 Answers  


what are the differences between windows services and web services?

5 Answers   Tech Mahindra,


Explain file-based dependency and key-based dependency.

0 Answers   MindCracker,


What does asp stand for in asp.net?

0 Answers  


what is view stat? how it is use.

3 Answers   TCS,


What is the full meaning of asp.net?

0 Answers  


Explain Life cycle of ASP.NET page when a request is made.

0 Answers  


Explain how can we access static variable?

0 Answers  


Explain the asp.net mvc request life cycle? : asp.net mvc

0 Answers  


Differentiate session and cookie

1 Answers  


Categories