ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   SiteMap shows list of All Categories in this site.
Google
 
Categories  >>  Software  >>  Microsoft Related  >>  ASP.NET
 
 


 

 
 Visual Basic interview questions  Visual Basic Interview Questions
 C Sharp interview questions  C Sharp Interview Questions
 ASP.NET interview questions  ASP.NET Interview Questions
 VB.NET interview questions  VB.NET Interview Questions
 COM+ interview questions  COM+ Interview Questions
 ADO.NET interview questions  ADO.NET Interview Questions
 IIS interview questions  IIS Interview Questions
 MTS interview questions  MTS Interview Questions
 Crystal Reports interview questions  Crystal Reports Interview Questions
 BizTalk interview questions  BizTalk Interview Questions
 Dot Net interview questions  Dot Net Interview Questions
 Exchange Server interview questions  Exchange Server Interview Questions
 SharePoint interview questions  SharePoint Interview Questions
 Microsoft Related AllOther interview questions  Microsoft Related AllOther Interview Questions
Question
What Are The Difference Between AutoEventWireup="true" and 
AutoEventWireup="False"
 Question Submitted By :: Als.senthur Ganesh
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What Are The Difference Between AutoEventWireup="true" and AutoEventWireup="False"
Answer
# 1
if the AutoEventWireup="true" propety in dropdown when 
index changed automatically post back to the server.

if the AutoEventWireup="true" propety in dropdown when 
index changed will not  post back to the server.
 
Is This Answer Correct ?    4 Yes 12 No
Rafiq
 
  Re: What Are The Difference Between AutoEventWireup="true" and AutoEventWireup="False"
Answer
# 2
Sorry in the above example is small mistake 


if the AutoEventWireup="true" propety in dropdown when 
index changed automatically post back to the server.

if the AutoEventWireup="false" propety in dropdown when 
index changed will not  post back to the server.
 
Is This Answer Correct ?    3 Yes 10 No
Navneet
 
 
 
  Re: What Are The Difference Between AutoEventWireup="true" and AutoEventWireup="False"
Answer
# 3
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 ?    1 Yes 3 No
Meganadha Reddy K.
 
  Re: What Are The Difference Between AutoEventWireup="true" and AutoEventWireup="False"
Answer
# 4
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 ?    7 Yes 0 No
Vishnu Prasad.c
 
  Re: What Are The Difference Between AutoEventWireup="true" and AutoEventWireup="False"
Answer
# 5
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 ?    3 Yes 1 No
Navneet
 
  Re: What Are The Difference Between AutoEventWireup="true" and AutoEventWireup="False"
Answer
# 6
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 ?    7 Yes 1 No
Vinodh Reddy
 
  Re: What Are The Difference Between AutoEventWireup="true" and AutoEventWireup="False"
Answer
# 7
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 ?    0 Yes 3 No
Ruchika Garg
 
  Re: What Are The Difference Between AutoEventWireup="true" and AutoEventWireup="False"
Answer
# 8
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 ?    1 Yes 0 No
Anil Jadhav
 
  Re: What Are The Difference Between AutoEventWireup="true" and AutoEventWireup="False"
Answer
# 9
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 ?    0 Yes 0 No
Uma
 

 
 
 
Other ASP.NET Interview Questions
 
  Question Asked @ Answers
 
Can you please anyone explain in detailed Webservices concepts in Asp.net?  1
What?s the difference between Codebehind="MyCode.aspx.cs" andSrc="MyCode.aspx.cs"? SLC-Ltd3
how to pass session value one url to another url.my code if session("user")="abc" then response.redirect("www.abc.com\client\home.aspx") end if. so how to pass value of session in browser url  1
About session modes Wipro2
How to compare two strings with out Case sensitive ? Protech4
what is caching? Microsoft2
Which template must you provide, in order to display data in a Repeater control? Wipro2
You ve defined one page_load event in aspx page and same page_load event in code behind how will prog run?  4
How do you get records number from 5 to 15 from a dataset of 100 records? Syntax-Softtech1
what is the assembly?  2
what is the difference b/w .net 1.1 and 2.0 ? Polaris2
For a webapplication if i want to gice access controls like admin,users how can i give security like rolebased? Syncfusion1
Compare and contrast between inline and code behind - which one is best?  1
What are the different types of Session state management options available with ASP.NET?  1
can we transfer data from one page to another page using viewstate if so how?if not y? Wipro25
Where can we set the specific variables for a application and Session objects ?  2
How to kill more than one session variables at a time iSoft6
define silverlight and advantages ?  2
difference between Trace and Debug ? Accenture2
Suppose you display a data having 200 records in a datagrid. Then you edit 100 records of them. Now when you will press update button,all 100 records should be updated in single shot rather than reading every record and updating. How to do it? Wipro2
 
For more ASP.NET Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com