Autoeventwireup ?

sureshcd10

Regular
Joined
Dec 25, 2003
Messages
77
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="ResumePost.aspx.vb" Inherits="MyProject.ResumePost" %>
<%@ Register TagPrefix="uc1" TagName="MyHomeBanner" Src="MyHomeBanner.ascx" %>

What is this Autoeventwireup ?

AutoEventWireup="false" what does it mean?

What is the significance of the following Line of code which u will see in the HTML coding part of the .ASPX file
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="ResumePost.aspx.vb" Inherits="MyProject.ResumePost" %>

What is the meaning of Inherits="MyProject.ResumePost" in the above line

Now take the second line

<%@ Register TagPrefix="uc1" TagName="MyHomeBanner" Src="MyHomeBanner.ascx" %>

Register TagPrefix="UC1" what is this ?

Where it is registering ?
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="ResumePost.aspx.vb" Inherits="MyProject.ResumePost" %>
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="ResumePost.aspx.vb" Inherits="MyProject.ResumePost" %> <%@ Register TagPrefix="uc1" TagName="MyHomeBanner" Src="MyHomeBanner.ascx" %>

Thank u all
 
If AutoEventWireUp is true then you do not have to manually wire all the event handlers up in code. However doing it manually will give better performance.
<@Register registers a user control (.ascx file) with the current page - this allows you to use a custom control on the page. The uc1 bit just gives your control a prefix (similar to how the built in web controls have a <asp: tag before them.
All .Net code is object orientated, when you create a web page and use the code behind feature (rather than inline code like classic asp) it will create a class to hold the page's code. In this case the class will be MyProject.ResumePost - your web page will inherit this class and as such have access to it's functionality at runtime.
 
Back
Top