Академический Документы
Профессиональный Документы
Культура Документы
On ASP.NET USING C#
Training from: Oaasis Solution, Software Support Systems Training & Development, Ahemdabad
Company Profile
Introduction to ASP.NET
ASP.NET is a part of the Microsoft .NET framework, developed by Microsoft, and is a powerful tool for creating dynamic and interactive web pages ASP.NET is a successor of Microsofts ASP technology
ASP.NET is built on the Common Language Runtime(CLR), allowing programmers to write ASP.NET code using any supported .NET language
Slide 3 of 72
What is ASP.NET
ASP stands for Active Server Pages. ASP.NET is a server side scripting technology that enables scripts (embedded in web pages) to be executed by an Internet server. ASP.NET file runs inside IIS IIS (Internet Information Server) is Microsoft's Internet server which comes as a free component with Windows servers
Slide 4 of 72
When a browser requests an ASP.NET file, IIS retrieves the ASP.NET file, forward it to ASP.NET script engine
The ASP.NET script engine reads the file, line by line, and executes the scripts in the file The processed ASP.NET file is generated as an HTML document and send to the web server Web server send then send the HTML page to the client Finally, the ASP.NET file is returned to the browser as plain HTML But Visual Studio 2008 and above does not need IIS to run ASP.NET file.
Slide 5 of 72
Features of ASP.NET
Compiled Code
Enriched Tool Support
Slide 6 of 72
Microsoft.Net FrameWork
The .NET Framework is the infrastructure for the Microsoft .NET platform. The .NET Framework is an environment for building, deploying, and running Web applications and Web Services. KeyWords of .Net Framework Easier and quicker programming
Reduced amount of code Declarative programming model Richer server control hierarchy with events Larger class library Better support for development tools
Slide 7 of 72
Parts of Framework
Slide 8 of 72
Compilation in .NET
Slide 9 of 72
Enables us to divide an ASP.NET page into two files o Presentation content file o Code-behind file Presentation content file, contains user interface elements, its extension is .aspx
Code-behind file contains all the application logic, event handling procedures, its extension is .cs (for c#) Advantage o Code can be easily understood and debugged
Slide 10 of 72
The Visual Studio .NET IDE provides two different views of a web form Design view HTML view
The Design view represents the user interface of the web forms page The HTML view represents HTML code of an ASP.NET web form.This view runs on any web browser that support HTML.
Slide 11 of 72
There are three kinds of server controls o HTML Server Controls - Traditional HTML tags o Web Server Controls - New ASP.NET tag o Validation Server Controls - For input validation
Slide 12 of 72
<tr></tr> <td></td>
Slide 13 of 72
Web server controls are traditional form controls used in visual Basic toolbox like BUTTON, CHECK BOX, TEXT BOX, etc. Also some new tools like AJAX,SITEMAP also added. Web server controls are special ASP.NET tags understood by the server
They require a runat="server" attribute to work The syntax for creating a Web server control is: <asp:control_name id="some_id" runat="server" />
Slide 14 of 72
Validation server controls are used to validate user-input so that wrong type of data cant be filled in database table. For example in gmail password is of minimum 6 character With combination of letter and words.
Validation controls are attached to an input control, such as a TextBox for which the input is to be validated Syntax: <asp:control_name id="some_id" runat="server" />
Slide 15 of 72
FileUpload control, for uploading file from client to server Calendar control, for displaying calendar AdRotator control, for randomly displaying different advertisements
Slide 16 of 72
Login Controls
ASP.NET login controls are used to easily build a user registration system for our website
By using these controls we are not required to write any code when performing these tasks, Login CreateUserWizard LoginStatus ChangePassword PasswordRecovery LoginName
Slide 17 of 72
Master Pages
A master page provides a template for other pages, with shared layout and functionality. Advantage of master pages websites easier to Maintain Extend Modify
Slide 18 of 72
Themes
Themes, or skins, allow developers to create a customized look for web applications
Is a composition by which we can define properties for different controls Used when many controls having same look is to be used on different pages Theme is prepared in skin file, having extension .skin
Slide 19 of 72
Database Connectivity
The classes under the Data Providers o The connection object, used to provide connection to the database o The command object, used to execute a command against a database o The DataReader object, data is fetched one by one o The DataAdapter object, data is fetched together and saved in data set
Slide 20 of 72
DataBound Controls
DataBound controls are used to generate applications user interface for working with data Used to display and edit database data, XML data, etc
Three main types of DataBound controls are o List controls o Tabular DataBound controls o Hierarchical DataBound controls
Slide 21 of 72
DataSource Controls
The ASP.NET framework includes following five DataSource controls o SqlDataSource o AccessDataSource o ObjectDataSource o XmlDataSource o SiteMapDataSource
Slide 22 of 72
ASP.NET Caching
Caching is used to increase speed of loading webpages and retrive data from webpages.
Recently used data is saved in temporarily buffer so that data will not have to be fetched from original server Caching can be of three types Page caching Partial page caching Data caching
Slide 23 of 72
Slide 24 of 72
Slide 25 of 72