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? 4 2864
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?
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?
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;
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; This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 where i can
pass the value of txtName without going to the page of the form and clicking
|
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" available on the XsltArgumentList. I think this
allows for cleaner and more readable code. Or, perhaps...
|
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 = LCase(strPartNo
Response.Write("strPartNo"& strPartNo& lngQty
Next
%
|
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 ;
|
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 two buttons, update and cancel.
| |
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 php with an ASP alternative. However,
after doing many searches on google and reading a couple...
|
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:
|
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")& "', '" & request.QueryString("TASK_ORDER_FORM_REFERENCE_NUMBER") &"', '" & request.QueryString ("TASK_TITLE") &"', '" &...
|
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 %>
<%
|
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.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
| |
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |