• Home
  • Jobs
  • Courses
  • Certifications
  • Companies
  • Online IDE
  • Login
  • Signup
MYTAT
  • Home
  • Jobs
  • Courses
  • Certifications
  • Companies
  • Online IDE
  • Login
  • Signup
ASP And ASP.NET Tutorials
  • ASP.NET Web Pages - Tutorial
  • ASP.NET Web Pages - Adding Razor Code
  • ASP.NET Web Pages - Page Layout
  • ASP.NET Web Pages - Folders
  • ASP.NET Web Pages - Global Pages
  • ASP.NET Web Pages - HTML Forms
  • ASP.NET Web Pages - Objects
  • ASP.NET Web Pages - Files
  • ASP.NET Web Pages - Databases
  • ASP.NET Web Pages - Helpers
  • ASP.NET Web Pages - The WebGrid Helper
  • ASP.NET Web Pages - The Chart Helper
  • ASP.NET Web Pages - The WebMail Helper
  • ASP.NET Web Pages - WebSecurity Object
  • ASP.NET Web Pages - Publishing The Website
  • ASP.NET Web Pages - Classes
  • ASP.NET Razor - Markup
  • ASP.NET Razor - C# And VB Code Syntax
  • ASP.NET Razor - C# Variables
  • ASP.NET Razor - C# Loops And Arrays
  • ASP.NET Razor - C# Logic Conditions
  • ASP.NET Razor - VB Variables
  • ASP.NET Razor - VB Loops And Arrays
  • ASP.NET Razor - VB Logic Conditions
  • ASP Tutorial
  • ASP Syntax
  • ASP Variables
  • ASP Procedures
  • VBScript Conditional Statements
  • VBScript Looping
  • ASP Forms And User Input
  • ASP Cookies
  • ASP Session Object
  • ASP Application Object
  • ASP Including Files
  • ASP The Global.asa File
  • ASP AJAX
  • ASP Sending E-mail With CDOSYS
  • VBScript Functions
  • VBScript Keywords
  • ASP Response Object
  • ASP Application Object
  • ASP Session Object
  • ASP Server Object
  • ASP ASPError Object
  • ASP FileSystemObject Object
  • ASP TextStream Object
  • ASP Drive Object
  • ASP File Object
  • ASP Folder Object
  • ASP Dictionary Object
  • ASP AdRotator Component
  • ASP Browser Capabilities Component
  • ASP Content Linking Component
  • ASP Content Rotator Component (ASP 3.0)
  • ASP Quick Reference
  • ADO Introduction
  • ADO Database Connection
  • ADO Recordset
  • ADO Display
  • ADO Queries
  • ADO Sort
  • ADO Add Records
  • ADO Update Records
  • ADO Delete Records
  • ADO Demonstration
  • ADO Speed Up With GetString()
  • ADO Command Object
  • ADO Connection Object
  • ADO Error Object
  • ADO Field Object
  • ADO Parameter Object
  • ADO Property Object
  • ADO Record Object
  • ADO Recordset Object
  • ADO Stream Object
  • ADO Data Types
  • Home
  • Courses
  • ASP And ASP.NET Tutorials
  • ASP Forms And User Input

ASP Forms and User Input

Previous Next

User Input

The Request object can be used to retrieve user information from forms.

User input can be retrieved with the Request.QueryString or Request.Form command. 



Practice Excercise Practice now

Request.QueryString

The Request.QueryString command is used to collect values in a form with method="get".

Information sent from a form with the GET method is visible to everyone (it will be displayed in the browser's address bar) and has limits on the amount of information to send.

Example HTML form

<form method="get" action="simpleform.asp">
First Name: <input type="text" name="fname"><br>
Last Name: <input type="text" name="lname"><br><br>
<input type="submit" value="Submit">
</form>
 

If a user typed "Bill" and "Gates" in the HTML form above, the URL sent to the server would look like this:

https://www.mytat.co/simpleform.asp?fname=Bill&lname=Gates
 

Assume that "simpleform.asp" contains the following ASP script:

<body>
Welcome
<%
response.write(request.querystring("fname"))
response.write(" " & request.querystring("lname"))
%>
</body>
 

The browser will display the following in the body of the document:

Welcome Bill Gates



Practice Excercise Practice now

Form Validation

User input should be validated on the browser whenever possible (by client scripts). Browser validation is faster and reduces the server load.

You should consider server validation if the user input will be inserted into a database. A good way to validate a form on the server is to post the form to itself, instead of jumping to a different page. The user will then get the error messages on the same page as the form. This makes it easier to discover the error.



Practice Excercise Practice now

Previous Next
COMPANY
  • About us
  • Careers
  • Contact Us
  • In Press
  • People
  • Companies List
Products
  • Features
  • Coding Assessments
  • Psychometric Assessment
  • Aptitude Assessments
  • Tech/Functional Assessments
  • Video Assessment
  • Fluency Assessment
  • Campus
 
  • Learning
  • Campus Recruitment
  • Lateral Recruitment
  • Enterprise
  • Education
  • K 12
  • Government
OTHERS
  • Blog
  • Terms of Services
  • Privacy Policy
  • Refund Policy
  • Mart Category
Partner
  • Partner Login
  • Partner Signup

Copyright © RVR Innovations LLP 2025 | All rights reserved - Mytat.co is the venture of RVR Innovations LLP