Implementing forms with ASP
I am very new to the Active Server Pages (ASP). But I am not know how to use forms from the ASP.?? Also please tell me hoe can I retrieve the information from the form..?? Also can I process information gathered by an HTML form..? Tell me the commands that are used for this process..? Since I am new help me with all this topics. Extremely Thanks in Advance.!!
Re: Implementing forms with ASP
First I would like to answer your questions shortly. You can process information gathered by an HTML form by using the ASP. Also you can take the decisions or you can say validation based on the information to create dynamic web pages, by using the ASP code. Also the commands like Request.QueryString and Request.Form can be used to retrieve information from forms. In simple words, you can say that the Request.QueryString and Request.Form commands are used to retrieve user input from forms. You should also create a database to store the values of the user's input.
Re: Implementing forms with ASP
Before proceeding with an ASP code, you will have create an HTML form. Because the information would be sent to ASP page from the HTML form. You can use one of the following two methods for sending the data to ASP :
You will have to define the Method attribute in HTML Form element, through which you can come to know that these two types of sending information are defined. You will have to keep in mind that the location of the ASP web page must be specified that will process the information.
Re: Implementing forms with ASP
The below is an example of the form in which I am using the Method="get" in ASP.
HTML Code:
<html>
<body>
<form action="trial_request.asp" method="get">
Your name: <input type="text" name="fname" size="25" />
<input type="submit" value="Submit" />
</form>
<%
dim fname
fname=Request.QueryString("fname")
If fname<>"" Then
Response.Write("Welcome " & fname & "!<br />")
Response.Write("How are you?")
End If
%>
</body>
</html>
Re: Implementing forms with ASP
For using the Request.QueryString in ASP code, you can take a look at the following code :
HTML Code:
<body>
Welcome
<%
response.write(request.querystring("fname"))
response.write(" " & request.querystring("lname"))
%>
</body>