Results 1 to 2 of 2
  1. #1
    Lounger
    Join Date
    May 2002
    Location
    Fort Worth, Texas, USA
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Passing Parameters (VS.net 2002)

    How do I pass a parameter, a three digit code, from an html page to my aspx page so the aspx.vb can read it?

  2. #2
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    1,862
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Passing Parameters (VS.net 2002)

    This concept is not specific to .NET - You can do this one of 2 ways: 1) Form variables, 2) Querystring variables

    Form Variables are passed from one page to another when the submitting page uses < form action="scriptpage.aspx" > (where "scriptpage.aspx" is the name of your script page). Any form item (Textbox, checkbox, radio button, etc...) can be accessed from the script page using the following syntax: Request.Form("ObjectID") (where "ObjectID" is the ID of the item in question (textbox, checkbox, etc....)

    Querystring Variables are added to the URL of the script page's name (like "scriptpage.aspx?VariableName=Value"). The script page can access the variables with the following syntax: Request.Querystring("VariableName").

    Check this page for a good ASP example (which also applies to .NET)

    Also, you may want to post more web-related questions in the Web Design, Coding, and Scripting board.

    Hope this helps!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •