Results 1 to 2 of 2

Thread: Passing Parameter between forms

  1. #1

    Thread Starter
    Fanatic Member Wen Lie's Avatar
    Join Date
    Jul 1999
    Location
    Singapore
    Posts
    524

    Unhappy

    HELPPPPPP Guys....

    I'm doin my project on ASP with VB Script as my basic scripting code.
    My question is...
    Can I pass the parameter between forms ???

    Suppose, I have a variable at my 1st form...
    Lets say...

    Code:
    Dim myJob
    Dim myPack
    
    myJob = "PT000628"
    myPack = "A"
    
    Response.Redirect "myProc.Asp"
    Well... I'm gonna use the value of myJob and myPack variables, so, I've got to transfer them to myProc.Asp page.
    Could anybody tell me, how to do it ???
    I need it badly...

    Thx a lot... I'm waiting forward to hear from you soon....

    Cheers,
    Wen Lie
    Regards,
    [-w-]

  2. #2
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744
    You can use query strings to transfer values between two pages:

    First Page:
    Code:
    Dim myJob
    Dim myPack
    
    myJob = "PT000628"
    myPack = "A"
    
    Response.Redirect "myProc.Asp?myJob=" & myJob & "&myPack" & myPack
    Second Page:
    Code:
    Response.Write "Results from previous page:<BR>"
    Response.Write "myPack: " & Request.QueryString("myPack") & "<BR>"
    Response.Write "myJob: " & Request.QueryString("myJob") & "<BR>"

    Regards,


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