Web Programming Introduction. Best Dot Net Training

Web Programming Introduction. Best Dot Net Training

HTTP Protocol

  • The communication between web server and web browser on the internet is done using HTTP protocol.

  • HTTP is a W3C specification.

  • HTTP Protocol is the safest protocol on the internet.

  • HTTP is a stateless protocol. This is because it doesn’t know whether the request that has been made is part of an ongoing correspondence or just a single message.

  • HTTP communicates only in the String Format and is thus virus free and is platform independent.

    HTTP protocol works on PULL technology. i.e. we can pull everything available on the web server but we cannot push content to the server unless the server allows for it.

HTTP Request Structure (BrowserServer) HTTP Response Structure (ServerBrowser)

1. Request Line. 1. Status Line.

2. Request Header. 2. Response Headers.

3. Message Body (Posted Data). 3. Message Body (Page Content).

Request Line: Method Path Protocol / Version

Example: GET Demo/default.htm http/1.1

Request Header: These are the name-value pairs submitted by the browser to the server. It contains the information about the browser and the OS on the client machine.

Message Body is the stream of name-value pairs submitted to the server when the form is submitted using the method POST.

CGI Environmental Variables: It’s a collection of name-value pairs including request headers and information about the server in a context of a given request. The names of these variables are based on CGI (Common Gateway Interface) specification. These are also referred to as Server Variables.

When the form is submitted by clicking on the submit button it submits the Name/ Value pair of every input element in the form to the server.

About Get and Post Methods:

GET Method:

  1. All the name-value pairs are submitted as a query string.

  2. It’s not secured as it is visible in plain text format in the Location bar of the web browser.

  3. Length of the string is restricted.

  4. If the method is not mentioned in the Form tag, this is the default method used.

  5. If a get method is used and if the page is refreshed it would not prompt before the request is submitted again.

POST Method:

  1. All the name-value pairs are submitted in the Message Body of the request.

  2. Length of the string (amount of data submitted) is not restricted.

  3. Post Method is secured because Name-Value pairs cannot be seen in the location bar of the web browser.

  4. If post method is used and if the page is refreshed it would prompt before the request is submitted again.

Response Structure

Status Line:          Status Code Description

1xx                         Informational

2xx                         Success

3xx                         Redirect

4xx                         File Not Found / Not Authorized / Not Authenticated.

5xx                         Server Error

  • Every web server has a default directory and by default on IIS, it is c:\inetpub\wwwroot\. Only content placed in this folder and its subfolder is accessible to clients on the Internet.
  • From Browser: http://servername:PortNo/Directory/default.html

What is ASP?

  • ASP is a server-side scripting technology that enables scripts (embedded in web pages) to be executed by an Internet server

  • An ASP file can contain text, HTML, XML, and scripts

  • An ASP file has the file extension “. asp”

  • When a browser requests an HTML file, the server just returns the file without doing any processing.

  • When a browser requests an ASP file, IIS passes the request to the ASP engine (ASP.DLL) on the server

  • The ASP engine reads the file, line by line, and executes the scripts in the file which is marked as server script in <% %>

  • Finally, the output rendered is returned to the browser as plain HTML.

ASP Objects
: Request, Response, Session, Application, Server, ObjectContext & AspError.

<%……%> It contains the server side code in VBScript. The code out side the delimiter is Client side code and is as it is rendered to the client.

<% Response.Write (“hello”) %> or <%= “hello” %> are same.

Form Tag:


  1. Form tag cannot be nested inside another form tag.

  2. Input type’s button and reset and disabled elements name and value pair is not submitted to the server.

  3. Input type=” button” is used only for writing client-side JavaScript code.

  4. Input type=”checkbox” submits name and value pair only if the checkbox is checked otherwise nothing is submitted. If the value is not provided with the default value posted is “on”

  5. To group radio buttons, the same name must be given to them. And only the name-value pair of the radio button selected will be submitted to the server.

  6. For select, the name of select and value of the option selected is submitted to the server.

  7. Select tag with size attribute is rendered as Listbox otherwise its rendered as DropDownList

  8. If multiple options are selected in a list box, then with same name different values (multiple pairs) are submitted to the server

  9. For Textarea, the name of the text area and value of textarea is submitted to the server.

  10. Input type=”image” behaves as submit button where as <img> tag renders static image.

  11. A form can have more than one submit button, but only the name-value pair of the submit button used to post the form is included with the request.

  12. If the form has input type=”file” to upload a file along with request then its enctype=”multipart/form-data” and method=”post”.















Mr Sandeep Soni, CEO & Founder of Deccansoft Software Services. He has over 21years of Experience in Teaching and Development using Microsoft Technologies. Since 1997, of the total 100000+ students, Deccansoft has trained, he has personally trained over 60,000+ students and we are proud of him because almost every student he had trained is very happy with the quality and many are well placed in various I.T Firms. This will reflect in testimonials on our website.

Leave a Reply

Your email address will not be published. Required fields are marked *