VB.NET: Create a Dynamic Frame Tag based on QueryString Value

I have a main frame page (index.aspx) that loads a content frame.

If a value gets passed in on the query string to this index.aspx page, I want the content frame to load a different page.

Here's the code:

<SCRIPT language="VB" runat="server">
Dim ArticleID as Integer

Sub Page_Load(Source As Object, E As EventArgs)

      If IsNothing(Request.QueryString.GetValues("ArticleID")) then
            ArticleID=0
      Else
            ArticleID=Request.QueryString.GetValues("ArticleID")(0)
      End If

End Sub

</SCRIPT>
<html>

<head>
<title></title>
</head>

<frameset rows="121,*" framespacing="0" border="0" frameborder="0">
  <frame name="banner" scrolling="no" noresize target="contents" src="top_frame.aspx">
  <frameset cols="227,*">
    <frame name="contents" target="main" src="side_frame.aspx" scrolling="auto" noresize>
    <!-- HERE IS THE TROUBLE SPOT -->
              <frame name="main" src="main_frame.aspx" scrolling="auto">
<!-- this "main" frame should load "main_frame.aspx" if there is nothing
      on the querystring (or rather, if ArticleID=0); but if ArticleID has a value,
      it needs to load "myarticle.aspx" -- what is the syntax??? -->
  </frameset>
  <noframes>
  <body>

  <p>This page uses frames, but your browser doesn't support them.</p>

  </body>
  </noframes>
</frameset>

</html>

LVL 5
CreateObjectAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Joachim CarreinSr. Software DeveloperCommented:
for me this works:

<%if request("test") is nothing then%>
    <frame name="main" src="noscript.htm" scrolling="auto">
<%else%>
    <frame name="main" src="error.htm" scrolling="auto">
<%end if%>

or, use standard asp between html code

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Joachim CarreinSr. Software DeveloperCommented:
ehm, that or wasn't meant to be an or, the or is actually what i do in my example
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.