Grabbing paramter in the URL

  • Thread starter Thread starter Randy
  • Start date Start date
R

Randy

Hello,
I'm not sure if this is the place to post this, but...
In c#, I'm trying to find out how to grab a parameter from the incomming URL
using c#. I'm passing it in from another asp page in the URL.
Can someone tell me the mechanism to do this?

Thanks
 
Hi,

You'll be wanting to use the Request object. For example if you're URL
is:

mypage.aspx?Username=John

You can grab that info in C# on the target page by using something
like:

string myUser = Request.QueryString["Username"]

Regards,

Peter Chadwick (MCP)
(e-mail address removed)
 
Back
Top