Showing posts with label UniqueID. Show all posts
Showing posts with label UniqueID. Show all posts

Thursday, November 1, 2007

Get Rid Of _ctl0 Prefix In UniqueID Of Master Page

Master Pages seemed to solve old problems pretty well but now we've got some new. If you wander how to get rid of the prefix _ctl0 that is the answer - just set an ID of the master page in Page_Init. For example if we have MyMaster.master file, we need to have similar to this code:

<script runat="server" type="text/C#">
protected void Page_Init( object sender, EventArgs e )
{
this.ID = "MyMaster";
}
</script>

NOTE: Do not use Load event! It causes problems with wizzard and multiview controls... more
eXTReMe Tracker