ASP.NET

 
Building ASP.NET Pages
By: Savan
1 months 13 days ago
Copy and paste these links in your blog or web site to share the presentation.
URL:
Embed:
Thumbnail:
Report Spam Share Presentation Download
Add to my content
 
Presentation Transcript
Web Applications Development using Microsoft ASP.NET : Web Applications Development using Microsoft ASP.NET
Introduction : B. R. Javani - SUCSD, Rajkot 2 Introduction ASP.NET is Microsoft's flagship technology for building highly interactive, highly scalable websites. Some of the largest websites hosted on the Internet were built with the ASP.NET Framework, including the Dell website (www.Dell.com), parts of the Martha Stewart website (www.MarthaStewart.com), parts of the eBay website (www.eBay.com), the XBOX website (www.xbox.com), the MySpace website (www.MySpace.com), and the Microsoft website itself (www.Microsoft.com). If you need to build a highly interactive website that can scale to handle thousands of simultaneous users, then ASP.NET is the technology to use. The ASP.NET 2.0 Framework is the version of the Microsoft ASP.NET Framework. The ASP.NET 2.0 Framework introduces more than 50 new controls. Following are just a few of the significant new features of ASP.NET 2.0: A new declarative data access model By taking advantage of the new data access controls, you can display and edit a set of database records without writing a single line of code. Master Pages and Themes By taking advantage of Master Pages and Themes, you can easily create a common style and layout for all the pages in your website. Membership API By taking advantage of the Membership API, you can build an entire user registration system that stores user information in a Microsoft SQL Server database table or Active Directory without writing any code. Web Parts By taking advantage of Web Parts, you can build portal applications that can be customized by users or administrators at runtime. SQL Cache Invalidation By taking advantage of SQL Cache Invalidation, you can cache database records in memory and reload the records automatically when the data in the underlying database changes. AJAX By taking advantage of AJAX, you can update a web page without posting the page back to the web server.
ASP.NET Page : B. R. Javani - SUCSD, Rajkot 3 ASP.NET Page Web Application Development FirstPage.aspx An ASP.NET page contains the most common elements like a directive, a code declaration block, and a page render block. A directive looks like this: <%@ Page Language="VB" %> A directive always begins with the special characters <%@ and ends with the characters %>. Directives are used primarily to provide the compiler with the information it needs to compile the page. For example, the directive above indicates that the code contained in the page is Visual Basic .NET (VB .NET) code. The page is compiled by the Visual Basic .NET compiler and not another compiler such as the C# compiler. The next part of the page begins with the opening tag. The block. On the other hand, a no compile page can contain ASP.NET controls and databinding expressions. FirstPage.aspx The class in FirstPage.aspx inherits from the System.Web.UI.Page class. The ProcessRequest() method is called by the ASP.NET Framework when the page is displayed. This method builds the page's control tree.
Understanding Control Trees : B. R. Javani - SUCSD, Rajkot 21 Understanding Control Trees an ASP.NET page is really the source code for a .NET class. Alternatively, you can think of an ASP.NET page as a bag of controls. More accurately, because some controls might contain child controls, you can think of an ASP.NET page as a control tree. For example, the page in ShowControlTree.aspx contains a DropDownList control and a Button control. Furthermore, because the <%@ Page %> directive has the TRace="true" attribute, tracing is enabled for the page. ShowControlTree.aspx Notice that there are several LiteralControl controls interspersed between the other controls in the control tree. What are these controls? Remember that everything in an ASP.NET page is converted into a .NET class, including any HTML or plain text content in a page. The LiteralControl class represents the HTML content in the page (including any carriage returns between tags). Normally, you refer to a control in a page by its ID. However, there are situations in which this is not possible. In those cases, you can use the FindControl() method of the Control class to retrieve a control with a particular ID. The FindControl() method is similar to the JavaScript getElementById() method.
Using Code-Behind Pages : B. R. Javani - SUCSD, Rajkot 22 Using Code-Behind Pages The ASP.NET Framework (and Visual Web Developer) enables you to create two different types of ASP.NET pages. You can create both single-file and two-file ASP.NET pages. In a single-file ASP.NET page, a single file contains both the page code and page controls. The page code is contained in a