What is the significance of AutoEventWireUp attribute?

 Posted by Syedshakeer on 8/24/2009 | Category: ASP.NET Interview questions | Views: 5942

Gets or sets a value indicating whether events for ASP.NET pages are automatically connected to event-handling functions.

@ Page language="c#" Codebehind="WebForm1.aspx.cs"
AutoEventWireup="false" Inherits="TestWebApp.WebForm1"
The AutoEventWireup attribute may have a value of true or false. When an ASP.NET Web Application is created by using Microsoft Visual Studio .NET, the value of the AutoEventWireup attribute is set as false.
We can specify the default value of the AutoEventWireup attribute in the following locations:
• The Machine.config file.
• The Web.config file.
• Individual Web Forms (.aspx files).
• Web User Controls (.ascx files)
The value of the AutoEventWireup attribute can be declared in the <pages> section in the Machine.config file or the Web.config file, as follows

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Posted by: Bhupentiwari on: 6/25/2015 | Points: 10
Its value is by default 'True' not false as mention above

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="Login" %>

Login to post response