473,397 Members | 1,969 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,397 software developers and data experts.

HttpRequest parameter read

Hello,

I am developing a web application. If i call an aspx page with several
parameters, is there a way to get access to parameter values by key? I am
using C#

E.g.

void PageLoad(object sender, EventArgs e) {
string album = Request.<???>("album");
}

And a call the page: http://mywebsite.com/pics.aspx?album=FirstAlbum.

As i could see, it only provides methods to get a list of parameters and
then loop thru them.
Is there any direct way?

PS Sorry for cross-posting, i wasn't sure either to post the question to C#
or ASP.NET NG.

Thank you,
Andrey
Nov 18 '05 #1
3 1566
String album = Request.QueryString["album"];

havent tried this, but should work

Kalpesh
Nov 18 '05 #2
"MuZZy" <le*****************@yahoo.com> wrote in
news:tw3gc.9650$0b4.20257@attbi_s51:
Hello,

I am developing a web application. If i call an aspx page with
several parameters, is there a way to get access to parameter
values by key? I am using C#

E.g.

void PageLoad(object sender, EventArgs e) {
string album = Request.<???>("album");
}

And a call the page:
http://mywebsite.com/pics.aspx?album=FirstAlbum.

As i could see, it only provides methods to get a list of
parameters and then loop thru them.
Is there any direct way?


Andrey,

string album = string.Empty;
if (Request.Params["album"] != null)
album = Request.Params["album"].ToString();
Hope this helps.

Chris.
-------------
C.R. Timmons Consulting, Inc.
http://www.crtimmonsinc.com/
Nov 18 '05 #3
string album = Request.QueryString["album"];

--
Manohar Kamath
Editor, .netWire
www.dotnetwire.com
"MuZZy" <le*****************@yahoo.com> wrote in message
news:tw3gc.9650$0b4.20257@attbi_s51...
Hello,

I am developing a web application. If i call an aspx page with several
parameters, is there a way to get access to parameter values by key? I am
using C#

E.g.

void PageLoad(object sender, EventArgs e) {
string album = Request.<???>("album");
}

And a call the page: http://mywebsite.com/pics.aspx?album=FirstAlbum.

As i could see, it only provides methods to get a list of parameters and
then loop thru them.
Is there any direct way?

PS Sorry for cross-posting, i wasn't sure either to post the question to C# or ASP.NET NG.

Thank you,
Andrey

Nov 18 '05 #4

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

Similar topics

3
by: HikksNotAtHome | last post by:
In Mozilla 1.4b, when the URL is set to a local URL, it works as expected. function showIt(){ var xmlhttp = new XMLHttpRequest(); xmlhttp.open("GET", "blank.html" ,true);...
2
by: Randy Webb | last post by:
Is the HTTPRequest Object in IE limited to the Same Origin Policy when run from a webserver? <URL: http://www.hikksworld.com/HTTPRequestIE.html /> When run in IE, throws a "Permission Denied"...
0
by: Bp | last post by:
I'm writing a simple HTTPRequest that retrieves the content of a web page. Dim httpReq As System.Net.HttpWebRequest Dim httpResp As System.Net.HttpWebResponse httpReq =...
4
by: Daniel Rimmelzwaan | last post by:
I am having trouble getting the XML out of an HttpRequest object. I am sending the XML from biztalk into my aspx page, after which I want to take the XML out of it and process it using a...
3
by: MuZZy | last post by:
Hello, I am developing a web application. If i call an aspx page with several parameters, is there a way to get access to parameter values by key? I am using C# E.g. void PageLoad(object...
1
by: Mark Miller | last post by:
I just recently started getting the above error on a page I am posting MULTIPART/FORM-DATA. We have SoftArtisans FileUp component and Filter installed on the server in question and up until a day...
1
by: Gunnar | last post by:
I am finding some unusual behavior with techniques I am using to show/hide/update data without having to refresh the page. I'm quite sure it's developer ignorance on my part and would be grateful...
2
by: Andrea | last post by:
Is possible, without using the login system provided with .net framework, to modify the value of this property? Reflectoring it, there is a get_IsAuthenticathed() booleand fucntion, but I don't...
1
by: Jeff | last post by:
ASP.NET 2.0 I'm about to program a HttpRequest from my asp.net 2.0 website. I'll request another server using HttpRequest and ask if password etc are okay.... So I've looked into the...
1
by: Michaelp | last post by:
Hello! I am studying the way PHP allows programmers to manipulate Http communication, and have looked at the HttpRequest and HttpResponse classes. All functions I find in the documentation...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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.