473,386 Members | 1,795 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,386 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 1565
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
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...

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.