1. February 2011 13:05
Just like any other technology, you will also find new terminologies in the ASP.NET as well. For a practical example, the word used to mention the web page is ASP.NET is known as a web form and it is the most important terminology of ASP.NET as it’s a central object in the language of ASP.NET. At a first look, the web forms look just like static HTML pages. However, they also contain .NET specific components in addition to the HTML elements as well as some code which executes on the server’s machine.
Each web form contains a tag <form runat = “server”>, which holds the ASP.NET specific elements in it which makes the page. However, there is no support for multiple forms. The actual structure of a simple web form is given below:
<%@ Page Language="language" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
… some code …
<title> Title of the Page</title>
<form id="form id" runat="server">
… UI elements…
In order to programmatically access and change the data, the classs System.Web.UI.Page is being used. It is mandatory to define this class in the code file of a web form. In case, user is not generating a specific code file for a web form (when all the code is written in the file .aspx), the class is still gets generated, it is just that user is not able to see that.
In ASP.NET, wide ranges of UI elements are available to use in a web form which also includes the static HTML code. But, a user shall use the elements for which either values can be generated or changed. Such elements are known as controls in ASP.NET. There are numerous controls available in the ASP.NET as listed below:
- Master Pages
- Web User Controls
- Web Server Controls
- HTML Server Controls
We will learn about such controls in the coming chapters.
For Step 2 please click here.