ARTICLE

Advance features of ASP.NET 2.0

Posted by Purushottam Rathore Articles | ASP.NET using VB.NET January 22, 2009
This article will help you to understand the basic concept of ASP.NET 2.0. You can learn how to develop ASP.NET 2.0 application. Advance features of ASP.NET 2.0 are including in this article. You will also learn why we need ASP.NET 2.0.
 
Reader Level:

ASP.NET is an exciting server side technology used for developing web based applications. It uses the namespaces, classes and methods provided by the .NET Framework. ASP.NET 2.0 is the popular framework and latest among developers. Now a day, developers are working to convert existing ASP.NET 1.1 applications to 2.0 to take advantage of its rich features. ASP.NET 2.0 has simplified the work of developers by providing many new controls. You can perform all tasks using Wizards. There is no need to write long lines of code even for database access.

Basic Requirements

You need a computer with a minimum of 512 MB of RAM to properly develop and execute ASP.NET applications. Firstly, you should install .NET Framework SDK 2.0. The SDK can be downloaded from the website of Microsoft.

Visual Studio 2005 is not compulsorily required for developing ASP.NET applications. You can make use of Notepad as an editor for entering source codes. Visual Studio 2005 will greatly simplify the development task as you can drag and drop controls from the Toolbox. It also comes with Intelligence which will help you to complete the code. I will show you how to make use of both these editors for developing ASP.NET applications.

I assume that you have installed .NET Framework 2.0 on your system. Notepad comes with the Windows operating system so there is no need to install it separately.

For Example:

Let us examine how to write a simple ASP.NET program with Notepad as the editor.

Open Notepad, enter the following code and save the file as Hello.aspx. This file is called as a WebForm. Each and every ASP.NET page is termed as a WebForm. Where  .aspx is the extension of the asp.net.

<%@ Page Language="VB" %>
<script runat="server">
Private Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs)
TextBox1.Text = "Welcome to ASP.NET"
End Sub
</script>
<
html>
  <
head></head>
    <
body>
      <
form id="Form1" runat="server">
        <
p>
          <
asp:TextBox id="TextBox1" runat="server"></asp:TextBox>
        </
p>
        <
p>
          <
asp:Button id="Button1" onclick="Button1_Click"runat="server" Text="OK">  </asp:Button>
        </
p>
      </
form>
    </
body>
</
html>

A server with the specific port will be started if you use Visual C # 2005 Express for executing the above program. You can locate the server on the Taskbar.

In the above code, we have placed a textbox control and a button control. When the user clicks the button the text "Hello to ASP.NET" will be displayed on the Textbox.

Let us now examine the code in a much deeper way.

<asp:Button id="Button2" onclick="Button1_Click" runat="server" Text="OK"></asp:Button>

All .NET Server controls should be coded in the format of <asp:CONTROLNAME></asp:CONTROLNAME>. The runat attribute is important as it signifies that the control is a server side one. The onclick attribute is an event handler. Its value is given as Button1_Click. This is because the event is fired when the button is clicked.

All server side tags are enclosed within <form></form> tag. The code for handling the event is to be given inside <script></script> tag as shown in the above example.

Why we need ASP.NET 2.0?

 

ASP.NET 2.0 is the extend version of ASP.NET 1.x. it contains the advance features. It provide the powerful features to the programmer to build the website. ASP.NET 2.0  is 100-percent backwards compatible with the current version of ASP.NET and will provide a smooth migration experience when it is released. Backwards compatibility surely means that all ASP.NET 1.x code you may have will work as expected in ASP.NET 2.0. However, a simple version switch doesn't guarantee that you will make the most out of the ASP.NET 2.0 framework. Taking advantage of the new features of ASP.NET 2.0 ensures more compact code, a richer set of services and capabilities, a more effective and appealing user interface, a more elegant and easy-to-maintain application architecture, and a powerful set of administration tools.

 

Additional features of ASP.NET 2.0

 

There are the following features of the ASP.NET 2.0.

 

  • Master page
  • Data control
  • Themes and control
  • Navigation control
  • New server control
  • Potential customers
  • Existing customers 

Master page:

 

Master page is use to define common structure and interface elements for any website, such as a page header, footer, or navigation bar, in a common location. Master page can shared many different pages within the website.

 

Data control:

 

Data access can possible by using the new data-bound and data source controls. There are new data source controls to represent different data backend such as SQL, business objects, and XML, and there are new data-bound controls for rendering common UI for data, such as grids, details, and data-bound forms.

 

Themes and control:

  

Themes allows for easy customization of a site's look-and-feel. ASP.NET Theme enables you to apply a consistent style to the pages in your website. You can use a Theme to control the appearance of both the HTML elements and ASP.NET controls that appear in a page.

 

A Theme folder can contain a variety of different types of files, including images and text files. You also can organize the contents of a Theme folder by adding multiple subfolders to a Theme folder.

 

There are the most important types of files in a Theme:

  • Skin Files
  • Cascading Style Sheet Files 

A Theme can contain one or more Skin files. A Skin enables you to modify any of the proprieties of an ASP.NET control that have an effect on its appearance.

 

Navigation control:

 

Navigation control Provide a common UI for navigating between pages in your website, such as tree views, menus, and breadcrumbs etc. The new Site Navigation features in ASP.NET 2.0 can make building navigation structures across a web-site much easier.

 

At a high-level, the new Site Navigation features allow you to define (outside of code or pages) the "site map" structure of how your site is laid out. Specifically, it allows you to define the relationships between pages on the site. What is the "home" entry-point, what are the sub-sections of it, and how individual pages fit within it. This information is cached by ASP.NET, and you can then get access to this sitemap structure at runtime.

 

New server control:

Server controls are tags that are understood by the server.

There are three kinds of server controls:

  • HTML Server Controls - Traditional HTML tags
  • Web Server Controls - New ASP.NET tags
  • Validation Server Controls - For input validation

ASP.NET 2.0 includes 45 new server controls that enable powerful declarative support for data access, login security, wizard navigation, image generation, menus, tree views, portals and more. Many of the new controls take advantage of core application services in ASP.NET for scenarios like data access, membership and roles, and personalization.

 

Potential customers:

 

New customers can automatically create the ASP.NET2.0 site via the control panel at no additional costs. ASP.NET2.0 is supported on ALL of our hosting packages and you can start hosting your websites on ASP.NET2.0 website and enjoy all its new features and technologies.

Existing customers:


DotNet allows us existing customers who are still use ASP.NET1.1 to upgrade to the ASP.NET 2.0 directly at NO EXTRA COST. The request can simply be made through the control panel and your site will be converted straight away with no problem. Nothing is even simpler than the request through the control panel.

Login to add your contents and source code to this article
share this article :
post comment
 
Team Foundation Server Hosting
Become a Sponsor
PREMIUM SPONSORS
  • ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications. Visit DynamicPDF here
    Finally – a virtual platform that delivers next-generation Windows Server 2008 Hyper-V virtualization technology from a managed hosting partner you can truly depend on. Visit www.maximumasp.com/max for a FREE 30 day trial. Hurry offer ends soon. Climb aboard the MaxV platform and take advantage of High Availability, Intelligent Monitoring, Recurrent Backups, and Scalability – with no hassle or hidden fees. As a managed hosting partner focused solely on Microsoft technologies since 2000, MaximumASP is uniquely qualified to provide the superior support that our business is built on. Unparalleled expertise with Microsoft technologies lead to working directly with Microsoft as first to offer IIS 7 and SQL 2008 betas in a hosted environment; partnering in the Go Live Program for Hyper-V; and product co-launches built on WS 2008 with Hyper-V technology.
Nevron Diagram
Become a Sponsor