In this tutorial you’ll learn how to create forms in ASP, how to use GET & POST methods.
How to retrieve data from form…etc.
Creating form
To create form we will use a
tag.
Every field of our form must be inside this tags.
METHOD parameter
There are 2 ways to send our data from form to an ASP page.
They are defined with METHOD parameter.
If we set METHOD parameter to GET, then our data is sent by textual string (querystring).
It’s located at the end of URL of the page that we send data.
In other case we can set METHOD to POST.
By using POST option our data won’t be visible to user.
Data will be sent through headers.
ACTION parameter
ACTION parameter is used to define a URL of the page on which we’ll sent data from our form.
If that page is in the same directory as our form page then is enoguh to write the name of our page
If that page is in some other directory then we have to write a relative path to our page.
If that page is in some other server then we have to write whole adress to our page. Aspolute path.
Example of form:
Create a page called form.html a add this code
Now, we have our form page set up.
Let’s go and create a page on which we’ll process data from our form.
Create a new page and call it formdata.asp
Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!