473,569 Members | 2,789 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

about request.queryst ring.

there is 3 links to page default.aspx,an d each one has a querystring,lik e
a=1, b=1 ,c=1.

problem is how do i ensure the name of querystring!

how do?
May 22 '06 #1
4 2861
Hi Arvan,
Can you please brief the scenario?
--
Deepson Thomas
"Arvan" wrote:
there is 3 links to page default.aspx,an d each one has a querystring,lik e
a=1, b=1 ,c=1.

problem is how do i ensure the name of querystring!

how do?

May 22 '06 #2
I quess u want to know which query string has come and from which page u
have been redirected
one way to know from which page u have been redirected is
Request.UrlRefe rrer.AbsolutePa th;

otherwise

u can check values are not null like this

if((Request.Que ryString["a"]!="")&&(Request .QueryString["a"]!=null)

{

string x=Request.Query String["a"]

}

"Arvan" <es***@126.co m> wrote in message
news:OB******** ******@TK2MSFTN GP03.phx.gbl...
there is 3 links to page default.aspx,an d each one has a querystring,lik e
a=1, b=1 ,c=1.

problem is how do i ensure the name of querystring!

how do?

May 22 '06 #3
I am sorry.Well,i mean i have 3 pairs name/value collection.For example, at
default aspx page, i redirect to catalog.aspx?ca taid=3 and at other code of
default.aspx redirect to catalog.aspx?ca tamr=1 .Right now how do i ensure
the name of querystring "cataid" or "catamr" at catalog.aspx.

if i can ensure the same , it could do something.

switch(.....)
case "cataid":
//do something about cataid
break;
case "catamr":
//do something about catamr
break;


May 22 '06 #4
Get the value of any querystring that you handle in the code:

string cataId, cataMr;
cataId = Request.QuerySt ring["cataid"];
cataMr = Request.QuerySt ring["catamr"];

Then check if the strings contain a value or not:

if (cataId != null) {
// handle cataid
}
if (cataMr != null) {
// handle catamr
}

or if they should be exclusive:

if (cataId != null) {
// handle cataid
} else if (cataMr != null) {
// handle catamr
}

Arvan wrote:
I am sorry.Well,i mean i have 3 pairs name/value collection.For example, at
default aspx page, i redirect to catalog.aspx?ca taid=3 and at other code of
default.aspx redirect to catalog.aspx?ca tamr=1 .Right now how do i ensure
the name of querystring "cataid" or "catamr" at catalog.aspx.

if i can ensure the same , it could do something.

switch(.....)
case "cataid":
//do something about cataid
break;
case "catamr":
//do something about catamr
break;

May 22 '06 #5

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

Similar topics

5
2558
by: momo | last post by:
Hello Newsgroup, I want to pass a Request.Form variable to an ASP form, through the url for example lets say i have a form with a textfiled called "txtName" if i click the submit button for example the asp page reads the content of this txtName as Request.Form("txtName") I want to achieve that the asp form is accessed through a URL...
0
3084
by: Anders Borum | last post by:
Hello! I would like to request a new method on the XsltArgumentList class, allowing developers to check the presense of a key/value pair. If you try to add a key/value pair that has already been defined in the list, an exception is thrown. Rather than using the "GetParam" method, it would be usefull to have a method called ".Exists"...
2
1835
by: mahsa | last post by:
Hi have have some link like thi http://x.com/Shoppingcart.aspx?pn=ps50210&qty_ps50210=1&pn=excel&qty_excel=1&pn=l4504000&qty_l4504000=1&sku=PS50210&cat=laminate&action=updat now I want to request the dat I use this code in as <%For Each strPartNo In Request.QueryString("pn" lngQty = Request.QueryString("qty_" & strPartNo strPartNo =...
6
1567
by: Steve B. | last post by:
Hello everybody In a webpage, I use JS display data from an xml file and a xsl file: var data = new ActiveXObject("Microsoft.XMLDOM"); data.async = false; var dataUrl = "data.aspx"; data.load(dataUrl) ; var transform = new ActiveXObject("Microsoft.XMLDOM"); transform.async = false ;
6
1216
by: Joe | last post by:
Hi, I have a MS Access DB in which a record has just too many fields to be able to allow users to do inline editing in a datagrid. So I want to display as First Name: Text box where first name is displayed and can be edited. Last Name: Text box where last name is displayed and can be edited. At the end of this list, I want to have...
10
3406
by: glenn | last post by:
I am use to programming in php and the way session and post vars are past from fields on one page through to the post page automatically where I can get to their values easily to write to a database or continue to process on to the next page. I am now trying to learn ASP to see if we can replace some of our applications that were written in...
3
1178
by: Jeff | last post by:
Hey asp.net 2.0 (C#) Retriving value: In my webpage, I need to retrieve a value from the URL, this is a parameter stored in the url, like this: www.helloworld.com?testid=34 what C# code shall I use to retrive this testid value? Setting value:
3
6157
by: ebru | last post by:
about insert/delete/update records in mysql server with asp code how can I insert record in mysql database.. I insert into database but if I leave one text box empty, its give me error how can overcome on it... my code is like "INSERT INTO hamp6 VALUES ('" & request.QueryString("FRAME_WORK_ARRANGEMENT_REF_NUM")& "', '" &...
7
9650
by: =?Utf-8?B?QVRT?= | last post by:
HOWTO Make CStr for JavaScript on ASP w/ Request.Form and QueryString In ASP, Request.Form and Request.QueryString return objects that do not support "toString", or any JavaScript string operation on parameters not passed. Example: Make a TST.asp and post to it as TST.asp?STATE=TEST <%@ Language=JavaScript %> <%
0
7924
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8120
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7672
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6283
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5512
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1212
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
937
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.