473,404 Members | 2,195 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

Grabbing parameter from URL

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

Thanks
Nov 16 '05 #1
3 2492
RCS
I assume you mean ASPX? then Request.QueryString["myvar"].ToString()

"Randy" <te**@temp.com> wrote in message
news:OV****************@TK2MSFTNGP09.phx.gbl...
Hello,
Can someone tell me how to (in c#) grab an incoming parameter in the URL
in an ASP page.

Thanks

Nov 16 '05 #2
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]
- mv*@spam.guard.caspershouse.com

"Randy" <te**@temp.com> wrote in message
news:OV****************@TK2MSFTNGP09.phx.gbl...
Hello,
Can someone tell me how to (in c#) grab an incoming parameter in the URL
in an ASP page.

Thanks

Nov 16 '05 #3
Oops, the solution I gave was for form variables. See RCS's response
for the correct method.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:%2****************@TK2MSFTNGP15.phx.gbl...
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]
- mv*@spam.guard.caspershouse.com

"Randy" <te**@temp.com> wrote in message
news:OV****************@TK2MSFTNGP09.phx.gbl...
Hello,
Can someone tell me how to (in c#) grab an incoming parameter in the URL
in an ASP page.

Thanks


Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Joe | last post by:
I need to connect to 10 web sites to grab content from them. I would like to connect to each site simultaneously so that I can obtain the data as fast as possible. I am familar doing this with...
4
by: InvisibleMan | last post by:
Hi, Thanks for any help in advance... I'm wondering if anyone knows how or has the resource for graabing a users email address without them knowing? Before I hear all the 'Its not ethical'...
3
by: InvisibleMan | last post by:
Hi, Thanks for any help in advance... I'm wondering if anyone knows how or has the resource for graabing a users email address without them knowing? Before I hear all the 'Its not ethical'...
0
by: Shravan | last post by:
Hi, Sometimes winforms DataGrid is grabbing focus when DataSource is set. Its not happening always, happens very rarely. If anybody knows when would this happen and the workaround for it I would...
4
by: darrel | last post by:
I have a contact form that a person submits to the server. In ASP, you'd make a page, post the form to another page, which would grab the values and do somethign with them. in ASP.NET, it...
3
by: Randy | last post by:
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...
0
by: .Net Sports | last post by:
I've been looking everywhere, but i can't locate any functions, or articles on the net or my resources, on how to open a file using vb.net, and then grabbing certain parts of the file, and putting...
3
by: Curtis | last post by:
Hello everyone: Recently, I've come across the need to accept an arbitrary amount of arguments in my function, but I also need to alter the data in the calling scope. I have been trying to...
5
by: joe_doufu | last post by:
Hi, old web developer, new to Ajax and XML here. I'm developing an application that grabs an XML file from a (PHP) web service. In fact, it's going to be an online game. When the user clicks a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.