Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read SiteMap

Tags: , , , ,

Sponsored Links



How to use Get Method in ASP Form?

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 28-01-2010
SKREECH's Avatar
Member
 
Join Date: Jul 2006
Posts: 124
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
Reply With Quote
  #2  
Old 28-01-2010
MindSpace's Avatar
Member
 
Join Date: Feb 2008
Posts: 1,832
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.
Reply With Quote
  #3  
Old 28-01-2010
opaper's Avatar
Member
 
Join Date: May 2008
Posts: 2,362
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.
__________________
The FIFA Manager 2009 PC Game
Reply With Quote
  #4  
Old 28-01-2010
Reegan's Avatar
Member
 
Join Date: Oct 2005
Posts: 2,299
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>
Reply With Quote
  #5  
Old 28-01-2010
Member
 
Join Date: Nov 2008
Posts: 1,193
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.
Reply With Quote
Reply

  TechArena Community > Software > Software Development


Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "How to use Get Method in ASP Form?"
Thread Thread Starter Forum Replies Last Post
Google Chrome is opening in basic HTML form instead of the Standard form Beatrix Technology & Internet 5 25-05-2011 11:21 PM
how to get items in a form to auto-resize with the form using visual basic deansmylie93 Software Development 2 02-05-2011 08:06 AM
How to validate form field before execution of a servlet service method Quattro Portable Devices 3 11-09-2009 04:28 PM
HTML form get method TAMAR Software Development 2 22-06-2009 02:40 PM
Problem reloading MDI child form in main form. AFFAN Software Development 3 30-01-2009 09:05 PM


All times are GMT +5.5. The time now is 03:37 AM.