473,412 Members | 3,763 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,412 software developers and data experts.

How to retrieve query string values..

Hi all.. I'n new to this forum..
Its a basic thing only.. bt i cudnt find the fault..

i'm passing two query strings in my asp.net page..
its something like this
Response.Redirect("FrmProduct2.aspx?qs1=" & "id1" & "?qs2=" & "id2")

is it correct method to pass two query strings??

In the FrmProduct2.aspx page, i hv written
TxtId.Text = Request.QueryString("qs1") //TxtId is a textbox

But i'm not receiving the value in the text box..

Can any one find the error???
Sep 22 '07 #1
4 1494
kenobewan
4,871 Expert 4TB
Try this - TxtId.Text = Request.QueryString["qs1"] - but what value have given qs1? HTH.
Sep 22 '07 #2
Hi all.. I'n new to this forum..
Its a basic thing only.. bt i cudnt find the fault..

i'm passing two query strings in my asp.net page..
its something like this
Response.Redirect("FrmProduct2.aspx?qs1=" & "id1" & "?qs2=" & "id2")

is it correct method to pass two query strings??

In the FrmProduct2.aspx page, i hv written
TxtId.Text = Request.QueryString("qs1") //TxtId is a textbox

But i'm not receiving the value in the text box..

Can any one find the error???
First of all you should escape the quotation marks inside the string like \" and secondly assuming you didn't do a typo here while writing the Response.Redirect statement you would get compilation error.

cheers!
Sep 24 '07 #3
Shashi Sadasivan
1,435 Expert 1GB
I think what you mean by this
Expand|Select|Wrap|Line Numbers
  1. Response.Redirect("FrmProduct2.aspx?qs1=" & "id1" & "?qs2=" & "id2")
is
Expand|Select|Wrap|Line Numbers
  1. FrmProduct2.aspx?qs1=ABC?qs2=PQR
But i believe the output you should be creating is
Expand|Select|Wrap|Line Numbers
  1. FrmProduct2.aspx?qs1=ABC&qs2=PQR
Sep 24 '07 #4
Hi Krishbiztech!

That is not the correct way of passing more than 1 query strings.
Below is the code for you reference.

in WEBFORM1.aspxResponse.Redirect("WebForm1.aspx?id1=" & "ruel" + "&id2=" + "sucgang")

in WEBFORM2.aspx
If Not IsPostBack Then
Dim x1 As String = Request.QueryString("id1")
Dim x2 As String = Request.QueryString("id2")
Response.Write(x1)
Response.Write(x2)
End if


Best Regards,

.////,
( '._.' )") "Hi, Im Ruel"
(__3: ) /
(")_!_(" )

================================================== ======








Hi all.. I'n new to this forum..
Its a basic thing only.. bt i cudnt find the fault..

i'm passing two query strings in my asp.net page..
its something like this
Response.Redirect("FrmProduct2.aspx?qs1=" & "id1" & "?qs2=" & "id2")

is it correct method to pass two query strings??

In the FrmProduct2.aspx page, i hv written
TxtId.Text = Request.QueryString("qs1") //TxtId is a textbox

But i'm not receiving the value in the text box..

Can any one find the error???
Sep 25 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Bob Kaku | last post by:
I'm trying to retrieve a text value from a MySQL database, put it into an updateable form, allow edits, and send back the edited text back into the MySQL database. I've been able to successfully...
6
by: Salvani Langosta | last post by:
In an Access 97 database, I use serveral global variables that hold information about the database, for example: gstrFileServer - holds the server root where the database is stored...
2
by: Rob | last post by:
Hi all, I've got multiple sets of radio button that are dynamically created in code and populated by a database query. The query returns about 20 recordsets with 3 radio buttons per recordset and...
11
by: Zorro | last post by:
Hello guys, <SELECT name = "f_hello"> <OPTION value = 'H'>Hello</OPTION>" <OPTION value = 'G'>Good-Bye</OPTION>" </SELECT> In the case above, I can easily retrieve the f_hello variable ...
5
by: Henrik | last post by:
The problem is (using MS Access 2003) I am unable to retrieve long strings (255 chars) from calculated fields through a recordset. The data takes the trip in three phases: 1. A custom public...
0
by: padhuwork | last post by:
Hi, I want to create a Windows DLL using VC++ 6.0 which connects to SQL Server. After establishing the connection, I want to retrieve records from table (query) and out put the recordset to a...
4
by: LetMeDoIt | last post by:
Greetings, I'm using ASP to retrieve from MSSQL and I then populate a table. After several months of successfull retrieves, this same code now bombs out. It turns out that if I clear out from...
1
maxamis4
by: maxamis4 | last post by:
Hello folks, Here is the backgroup. I am creating an agent that can find a user in LDAP and return the last logon date. Now i am not sure if with active directory you can user the...
2
by: John | last post by:
I am having trouble getting this code to work, and was wondering if someone could tell me what I am doing wrong. -------------------------------------- CODE--------------------------------------...
4
by: Archanak | last post by:
Hi, I have table like this: select * from sampletest; | title ...
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?
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
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...
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...
0
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...

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.