Results 1 to 5 of 5

Thread: How to use Get Method in ASP Form?

  1. #1
    Join Date
    Jul 2006
    Posts
    182

    How to use Get Method in ASP Form?

    I am very new to the ASP (Active Server Pages). Now I want to create form by using the Get method. I have tried a lot but not getting the appropriate results. Can someone tell me how to use Get Method in ASP Form? Since I am new to this scripting, please provide me some code for the same. I will be thankful to all the correct solutions.!! Also please provide me coding as soon as possible.!
    "Yea though I walk through the valley of the shadow of death... I will fear no evil." -Psalms 23

    K8N Diamond Plus (BIOS v1.2)
    AMD Athlon 64 X2 4400+
    Antec TruControl 550W
    NVidia GeForce 7900GT (NGO v1.8466 BETA)
    OCZ Platinum 2x1GB (2-3-2-5)
    SATA: WD740
    PATA: 2xWD2500, WD1200, NEC DVD/RW

  2. #2
    Join Date
    Feb 2008
    Posts
    1,852

    Re: How to use Get Method in ASP Form?

    Instead of explaining theoretically, I thought that providing you an example of the Get Method in ASP Form will be more useful to you. Here is coding for the same :
    Code:
    <form method="POST" action="TrialPost.asp">
    Name <input type="text" name="Name"/>
    Age <input type="text" name="Place"/>
    <input type="submit" />
    </form>
    Hope that this example will help you.

  3. #3
    Join Date
    May 2008
    Posts
    2,389

    Re: How to use Get Method in ASP Form?

    Before doing the Get Method, you should also understand the Request object which can be used to retrieve user information from forms. The following is an example of the same :
    Code:
    <form method="get" action="trialform.asp">
    First Name: <input type="text" name="name" /><br />
    Last Name: <input type="text" name="add" /><br /><br />
    <input type="submit" value="Submit" />
    </form>
    By using the Request.QueryString or Request.Form command, the user input can be retrieved.

  4. #4
    Join Date
    Oct 2005
    Posts
    2,393

    Re: How to use Get Method in ASP Form?

    For collecting the values in a form with method="get", the Request.QueryString command is used. The drawback of using the Get Method is that the information sent from a form with the GET method is visible to everyone. It will be displayed in the browser's address bar. And also the get method has limits on the amount of information to send. The following ASP script contains the "trialform.asp".
    HTML Code:
    <body>
    Welcome
    <%
    response.write(request.querystring("name"))
    response.write(" " & request.querystring("place"))
    %>
    </body>

  5. #5
    Join Date
    Nov 2008
    Posts
    1,192

    Re: How to use Get Method in ASP Form?

    You can also use the following example for using the Get Method in ASP form.. The code is :
    Code:
    <form method="GET" action="gettrial.asp"> 
    Your name<BR>
    <input type=text name=name size=15><BR>
    Your age<BR>
    <input type=text name=add size=45><BR>
    <input type=submit  value="Send information">
    </form>
    For getting information from the form in the response page you will have to use Request.Querystring command.

Similar Threads

  1. Replies: 5
    Last Post: 25-05-2011, 10:21 PM
  2. Replies: 2
    Last Post: 02-05-2011, 07:06 AM
  3. Replies: 3
    Last Post: 11-09-2009, 03:28 PM
  4. HTML form get method
    By TAMAR in forum Software Development
    Replies: 2
    Last Post: 22-06-2009, 01:40 PM
  5. Problem reloading MDI child form in main form.
    By AFFAN in forum Software Development
    Replies: 3
    Last Post: 30-01-2009, 09:05 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,126,594.45662 seconds with 17 queries