Professional Documents
Culture Documents
ASPdotNET Presentation Part1
ASPdotNET Presentation Part1
Net
Table of contents
Introduction to VS 2005
Application and Page Frameworks
GUI Controls
Validation Server Controls
Working with Master Pages
Themes & Skins
Collections & Lists
Data Binding
Data Management with ADO.Net
Working with XML
Site Navigation
Security
State Management
Caching
Debugging & Error Handling
File I/O & Streams
Configurations
Softsmith Infotech
Introduction to VS 2005
Visual Studio 2005 is an IDE that is used to
create ASPX pages (Web application)
Creation of web application also creates a set of
files.
Web application exists only in the location
specified by IIS virtual folder.
In a system, the web root folder is //localhost
This is the virtual folder
The physical path for this virtual folder is
\\inetpub\wwwroot
Softsmith Infotech
ASP .Net
Used to create web applications and web
services that run under IIS
ASP.NET is a collection of .NET classes
that collaborate to process an HTTP
request and generate an HTTP response
Helps us in creating Dynamic Web pages
Dynamic web pages Pages will be
generated at the server based on the users
request and then given back to the client
(user)
Softsmith Infotech
Softsmith Infotech
Page_Load
The server controls are loaded in the page .This event is called every time when
page is loaded
Control_Event
This event is fired when control like button are clicked or changed
Page_Unload
This event occurs when a page is Unloaded from memory
Page_Dispose
This event occurs when a page is released from memory
Softsmith Infotech
Softsmith Infotech
Softsmith Infotech
Softsmith Infotech
Softsmith Infotech
Softsmith Infotech
AssemblyInfo.cs
All the information about assembly including version, company
name etc
Default.aspx
The visual description of a Web form.
Default.aspx.cs
The code behind that responds to events on the Web form
Default.aspx.resx
XML resources used by web form
Global.asax
The global events that occur in web applications
Web.config
Configuration contents like authentication mode, error files etc.
Softsmith Infotech
GUI Controls
Softsmith Infotech
Server Control
Softsmith Infotech
Web Controls
System.Object
System.Web.UI.Control
WebControl
ListControl
Table
ListBox
Button
CheckBoxList
...
TextBox
...
Softsmith Infotech
Postback event
These events cause the web page to be
sent back to the server for immediate
processing
When page is posted back ,the Page_Init,
Page _Load events are handled
The page is submitted back and renders a
new version of itself back to the user
Softsmith Infotech
Validation Controls
ASP .Net provides 5 validation controls that are
used to check the validity of data entered by the
user in the server controls on the web page.
Client side validation is also possible through a
Jscript library WebUIValidation.js
Validation summary
Softsmith Infotech
Method:
Validate
Softsmith Infotech
Method
Validate
Softsmith Infotech
Compare Validator
To compare values entered in two controls
Properties:
ControlToCompare
ControlToValidate
ErrorMessage
ValueToCompare
Method:
Validate
Softsmith Infotech
Range Validator
To compare whether the entered value is
between two specified values
Properties:
ControlToValidate
ErrorMessage
Type
MaximumValue
MinimumValue
Method:
Validate
Softsmith Infotech
Custom Validator
To Check the validity of an entered item using a
client-side script or a server-side code, or both
Properties:
ControlToValidate
ErrorMessage
Events:
ServerValidate
Method:
OnServerValidate
Validate
Softsmith Infotech
Validation Summary
To Display validation errors in a central location or
display a general validation error description
Properties:
HeadText
ShowMessageBox
ShowSummary
Softsmith Infotech
User Controls
Softsmith Infotech
Calendar Control
DateTime
DateTime is a static class. Members can be accessed via
DateTime.Now and so on.
The DateTime value type represents dates and times with values
ranging from 12:00:00 midnight, January 1, 0001 Common Era to
11:59:59 P.M., December 31, 9999 C.E.
Few properties:
Today
Now
Date
Few Methods:
AddDays()
AddMonths()
Compare()
ToLongDateString()
ToShortDateString()
Softsmith Infotech
DataGrid Control
Provides templates
Standard
Custom
Provides paging
Repeater Control
Binding data
To bind embedded controls to the data source of the
container control
DataBinder.Eval() method is used
Syntax
<
%#DataBinder.Eval(Container.DataItem,D
ataFieldname")%>
Container represents the container for data items
DataFieldname represents the name of data item field
Softsmith Infotech