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 3 2985
String album = Request.QueryString["album"];
havent tried this, but should work
Kalpesh
"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/
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
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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);...
|
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"...
|
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 =...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
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
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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,...
|
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: 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...
|
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...
| |