Results 1 to 2 of 2

Thread: post result on a different page

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2004
    Posts
    83

    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

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    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
  •  



Click Here to Expand Forum to Full Width