Grabbing parameter from URL

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

Randy

Hello,
Can someone tell me how to (in c#) grab an incoming parameter in the URL in
an ASP page.

Thanks
 
Randy,

The Request exposed by the Page object (which is what your page derives
from) exposes an Item property (it is the indexer). You just have to pass
the key in the query string, and it will return the value.

Hope this helps.
 
Oops, the solution I gave was for form variables. See RCS's response
for the correct method.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Nicholas Paldino said:
Randy,

The Request exposed by the Page object (which is what your page derives
from) exposes an Item property (it is the indexer). You just have to pass
the key in the query string, and it will return the value.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Randy said:
Hello,
Can someone tell me how to (in c#) grab an incoming parameter in the URL
in an ASP page.

Thanks
 
Back
Top