Topic: Passing a QueryString to a Frame-IFrame from Code
Passing a QueryString to a Frame-IFrame from Code
1. Add a FRAME to your page markup within your body tags
2. Remove the "src" attribute
3. In the aspx.vb or aspx.cs code page, use the following to add the querystring to the src
attribute
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim queryString As String
If data.ContentType = "text/plain" Then
queryString += "val=valOne"
Else
queryString += "val=valTwo"
End If
Me.SomeFrame.Attributes("src") = "MyPage.aspx?" & queryString
Me.someHiddenFrame.Attributes("src") = "MyPage.aspx?" & queryString
End Sub