Forum Moderators: open
I'm getting pretty frustrated with a particular example I'm trying to do-- I want to pass a URL variable (GET) called "region"-- so right now the URL I'm requesting looks like
[mysite.com...]
on the mypage.aspx page, I have the following code--
<script runat="server">
Sub Page_load (ByVal Sender as Object, ByVal E As System.EventArgs)
RegionTag.Text = Request.QueryString("region")
End Sub
</script><asp:Label id="RegionTag" runat="server" />
Now, the page renders just fine, but I can't for the life of me get that URL var to show up, either using the Text method of the RegionTag or even a Response.Write. Any advice?
Thanks
<script runat="server">
Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
RegionTag.Text = Request.QueryString("region")
End Sub
</script>
It shouldn't matter that I'm doing the "CTRL-F5" method of testing the page rather than putting it on a real web server, should it?
Have you tried setting a breakpoint at the RegionTag.Text = Request.QueryString("region") line and running it in debug mode? (F5 without CTRL)
Does the debugger pause at that point? if not the Sub is not being called, as Ocean suspected.