Q.1 How to access Master page's controls on content page?
We will have to put a tag to content page then we can access master page's content place holder control and other content controls.
<%@ MasterType VirtualPath="~/MasterCAT.master" %>
Accessing control of master page
AdRotator adr = Master.FindControl("MyAdRotator");
===================
Q. 2 How to install an assembly to GAC?
gacutil -i assemblyname
===================
Q. 3 How can you attach master page dynamically?
this.MasterPageFile = "~/NewMaster.Master";
===================
Q.4 What is 'AutoEventWireup' ?
Its an attribute of 'Page' tag, that has true default value. This means events of page are bind with the event handlers written in code behind.
If we give it value false, then we need to specify code that connect page events to event handlers written in code behind file.
Ex. Connecting Page_load event to its handler
===================
Q.4 What is 'AutoEventWireup' ?
Its an attribute of 'Page' tag, that has true default value. This means events of page are bind with the event handlers written in code behind.
If we give it value false, then we need to specify code that connect page events to event handlers written in code behind file.
Ex. Connecting Page_load event to its handler
override protected void OnInit(EventArgs e) { this.Load += new System.EventHandler(this.Page_Load); }
No comments:
Post a Comment