''' <summary>
''' Change Master Page at runtime.
''' </summary>
''' <param name="sender"></param>
''' <param name="e"></param>
''' <remarks></remarks>
Private Sub Page_PreInit(sender As Object, e As System.EventArgs) Handles Me.PreInit
Dim x = ConfigurationManager.AppSettings("CurentProduct")
If (x IsNot Nothing) AndAlso (Not x.Equals(String.Empty)) Then
'Query (Select * From sysMasterPage Where IsDefault = 1)
Select Case x
Case "น้องอั้ม"
Me.Page.MasterPageFile = "~/อวบอึ๋ม.Master"
Response.Redirect("~/AOM/Default.aspx")
Case "ทวดต่าย"
Me.Page.MasterPageFile = "~/ยายเพิ้ง.Master"
Response.Redirect("~/PUNG/Default.aspx")
Case Else
'My ERP Solution
End Select
End If
End Sub