Click here to Skip to main content
15,885,537 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all
I a generating some aspx (web content page) in my application. My master page is at the Application root but those content pages are creating in the Directory "root/pages/page1/". Now I have to set the master page to these content page. In this way I tried to set the master page and added these codes in the aspx page when it was generating.

XML
<script runat="Server">
    Protected Sub Page_PreInit(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreInit
         Me.MasterPageFile = &quot;../../Main.master&quot;
    End Sub
</script>

but the master page could not associate. Can any body help me please.
Thanks,
Posted
Updated 4-Oct-10 1:57am
v2

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900