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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top