- Create two or more master pages with the same ContentPlaceHolder controls and public properties. These could be straight copies or better still two child masters based on the same masterfile
- Optionally, provide a way for users to switch between master pages.
Assign the master page in the content page’s Page_PreInit method.Session("masterpage") = "Master2.master"
Response.Redirect(Request.Url.ToString)
Sub Page_PreInit(ByVal sender As Object, ByVal e _ As EventArgs)
If Not (Session("masterpage") Is Nothing) Then
MasterPageFile = CType(Session"masterpage") ,String)End If
End Sub
No comments:
Post a Comment