Previously I was using VB.NET but when I write ASP.NET pages this is how it is done that does the same operation.
Code:
<%@ Page Language="VB" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<script runat="server">
Sub _onload(sender as Object, e as System.EventArgs) Handles Me.Load
Dim page As String = Request.QueryString("page")
Select Case page.ToLower
Case "login"
myContent.Controls.Add(LoadControl("./ControlFolder/Login.ascx"))
Case Else
myContent.Controls.Add(LoadControl("./ControlFolder/Main.ascx"))
End Select
End Sub
</script>
<head>
<title></title>
</head>
<body>
<div id="myContent" runat="server"></div>
</body>
</html>
Bookmarks