You can also use ASP.NET data binding to change the src of a frame, like this
In script block or code behind:
Public contentUrl as string = "main.aspx"
Private Sub Page_Load(<args not included)
If WhateverTest = True Then
contentUrl = "here.aspx"
In the html:
<frame src="<%# contentUrl %>" id="MainContent" name="MainContent" frameborder=no />