Hello everyone,
Could someone please give me a good explanation about what I can do with it? I can't really find it on Google..
Thanks in advance,
Davey
daveyb91
0
Newbie Poster
Recommended Answers
Jump to PostI use querystring to retrieve parameters send from another form, let's say that you are and index.html and there is a link url to default.aspx like this
~/Default.aspx?var=hellothen and the Server code from Default.aspx to retrieve that value i have this.
…string stTest = Request.QueryString["var"];
Jump to PostIts handy if you want to pass data to other pages, especially when you want it retained in the browser's history. If you POST search terms to google for example then you wouldn't have a list of all searches you performed in your browser history.
Jump to PostIt comes from the days of ASP.
The "Request.QueryString" command is used to collect values in a form with method="get".
SimpleForm_1.asp
<form method="get" action="SimpleFormHandler_1.asp"> <TEXTAREA NAME="location" COLS=33 ROWS=4></TEXTAREA> <input type='submit' value='Add Event'> </form>
SimpleFormHandler_1.asp
<%@ Language=VBScript %> <% Dim userLocation 'location is …
Jump to PostYou'll probably find more info on it if you search for "ASP Request.QueryString" and "ASP Request.Form".
C#
string userLocation; userLocation = Request.QueryString["location"];
C#
string userLocation; userLocation = Request.Form["location"];
Jump to PostExplain what you are trying to do first.
>>. At this point I get the entire code of my page! Not good, anyone got an idea about what's wrong? Here is my code:
From what you said I was guessing that when you entered a query string you …
All 17 Replies
jbisono
51
Posting Pro in Training
sknake
commented:
good explanation
+9
serkan sendur
commented:
if sknake thinks it is worth it, it is worth it
+7
sknake
1,622
Senior Poster
Featured Poster
serkan sendur
commented:
repute back function
+7
cgeier
187
Junior Poster
cgeier
187
Junior Poster
serkan sendur
821
Postaholic
Banned
daveyb91
0
Newbie Poster
daveyb91
0
Newbie Poster
sknake
1,622
Senior Poster
Featured Poster
daveyb91
0
Newbie Poster
daveyb91
0
Newbie Poster
sknake
1,622
Senior Poster
Featured Poster
daveyb91
0
Newbie Poster
sknake
1,622
Senior Poster
Featured Poster
daveyb91
0
Newbie Poster
sknake
1,622
Senior Poster
Featured Poster
daveyb91
0
Newbie Poster
sknake
1,622
Senior Poster
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.