|
-
Sep 11th, 2004, 12:16 AM
#1
Thread Starter
Lively Member
post result on a different page
Hi:
i'm developing a web based application in VB .NET. I have a form where a user can enter some criteria, click on a find button then the results will be posted on a different page on a datagrid. on form1( where the find button is located) i placed the below code in it:
Response.Redirect("area_find.aspx?code=txtAreaCode&description=txtAreaDescription")
txtAreaCode & txtAreaDescription are the criteria on the form
Code & desription are how they are defined in the database
on form2(where the datagrid will display the information) i placed the below code:
If Not IsPostBack Then
Dim v1, v2 As String
v1 = Request.Form("txtAreaCode.text")
v1 = Request.QueryString("code")
v2 = Request.Form("txtAreaDescription.text")
v2 = Request.QueryString("description")
then the sql code comes...
which should i use? Request.Form or Request.QueryString and how?
thanks in advance
-
Sep 13th, 2004, 02:25 AM
#2
In the page that does the submitting, is the form's method set to post or get?
If it's POST, then you could do a Request.Form(), else if it's GET and the data appears in the URL, then do a Request.QueryString()
What I fail to understand is, why you are placing the user-input text into a URL and then redirecting the page. Why not just submit it?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|