Upload
snehajai11170
View
218
Download
0
Embed Size (px)
Citation preview
8/12/2019 Slides ASP.net La1010 Lc 01
1/59
ER/CORP/CRS/LA1010/003 Ver. No.: 4.0 Copyright 2008, Infosys Technologies Ltd.
Education and Research We enable you to leverage knowledge anytime, anywhere!
ASP.NET 3.5 Web Applications and Web
Services (Long Cycle)
Day 1
8/12/2019 Slides ASP.net La1010 Lc 01
2/59
8/12/2019 Slides ASP.net La1010 Lc 01
3/59
Copyright 2008, Infosys Technologies Ltd.
Confidential Information
This Document is confidential to Infosys Technologies Limited. This document
contains information and data that Infosys considers confidential and proprietary(Confidential Information). Confidential Information includes, but is not limited to, the following:
Corporate and Infrastructure information about Infosys Infosys project management and quality processes Project experiences provided included as illustrative case studies
Any disclosure of Confidential Information to, or use of it by a third party, will be
damaging to Infosys.Ownership of all Infosys Confidential Information, no matter in what media it resides,remains with Infosys.Confidential information in this document shall not be disclosed, duplicated or used in whole or in part for any purpose other than reading without specific writtenpermission of an authorized representative of Infosys.This document also contains third party confidential and proprietary information.
Such third party information has been included by Infosys after receiving due writtenpermissions and authorizations from the party/ies. Such third party confidential andproprietary information shall not be disclosed, duplicated or used in whole or in part
for any purpose other than reading without specific written permission of anauthorized representative of Infosys.
3
8/12/2019 Slides ASP.net La1010 Lc 01
4/59
Copyright 2008, Infosys Technologies Ltd. 4
Course Objectives
To introduce web applicationTo introduce working with dynamic pagesTo create web application using ASP.NETIntroducing AJAXTo introduce .NET Web Services
8/12/2019 Slides ASP.net La1010 Lc 01
5/59Copyright 2008, Infosys Technologies Ltd. 5
Course Pre-requisites
Knowledge of .NET framework
C# programming languageSQL Server 2005
ADO.NET
8/12/2019 Slides ASP.net La1010 Lc 01
6/59
Copyright 2008, Infosys Technologies Ltd. 6
Expectations
At the end of the ASP.NET and Web Services module, the candidateshould be conversant with the following:
Developing web applicationsCreating and consuming Web Services
8/12/2019 Slides ASP.net La1010 Lc 01
7/59
Copyright 2008, Infosys Technologies Ltd. 7
Session Plan Day1
Web Applications
Information on ASPIIS
ASP.NET Overview ASP.NET Programming modelServer ControlsValidation ControlsUser Control
8/12/2019 Slides ASP.net La1010 Lc 01
8/59
Copyright 2008, Infosys Technologies Ltd. 8
Session Plan (Remaining Days)
Day 2
Error HandlingData Controls
ASP.NET Objects
Day 3State ManagementMaster PagesNavigation ControlsThemes, Styles and Skins
Day 4
Caching AJAX
Day 5Web Services
Security Aspects in ASP.NET
Day 6 and 7Project
8/12/2019 Slides ASP.net La1010 Lc 01
9/59
Copyright 2008, Infosys Technologies Ltd. 9
References
http://msdn2.microsoft.com/en-us/netframework/default.aspx
http://www.gotdotnet.comhttp://mealserver01/MELL/default.htmhttp://www.asp.net/Professional ASP.NET 3.5
Anderson,Francis,Howrad,Sussman,Watson(Wrox Publications)
Beginning ASP.NET 3.5 ,Ullman,Sussman,Kauffman,Hart,Maharry( WroxPublications)Murachs ASP.NET upgraders guide
8/12/2019 Slides ASP.net La1010 Lc 01
10/59ER/CORP/CRS/LA1010/003 Ver. No.: 4.0 Copyright 2008, Infosys Technologies Ltd.
Education and Research We enable you to leverage knowledge anytime, anywhere!
Introduction to Internet & Web-Applications
8/12/2019 Slides ASP.net La1010 Lc 01
11/59
Copyright 2008, Infosys Technologies Ltd. 11
Working of Internet
Web Server
Servers File
System
The Internet
8/12/2019 Slides ASP.net La1010 Lc 01
12/59
Copyright 2008, Infosys Technologies Ltd. 12
HTTP Request
The following is the request generated
The first thing specified by a Request is a HTTP command called METHODGET
POSTThis will be followed by
the path of the document the browser requiresthe version of HTTP used by the client
GET http://www.yahoo.com/ HTTP/1.1
8/12/2019 Slides ASP.net La1010 Lc 01
13/59
Copyright 2008, Infosys Technologies Ltd. 13
HTTP Response
The server processes the request and sends a Response
The following is an example of a response
HTTP/1.1 200 OK
Date: Sat, 18 Mar 2000 20:35:35 GMT
Server: IIS
Last-Modified: Wed, 20 May 1998 14:59:42 GMT
Content-Length: 2000
Content-Type: text/html
8/12/2019 Slides ASP.net La1010 Lc 01
14/59
Copyright 2008, Infosys Technologies Ltd. 15
Dynamic Pages
1. User Submits Form and resultant URL:
http://abcbooks.co.in/eshop/PurchaseItem?iname=Floppy+Disc&qty=12
Web Server
abcbooks.co.in
2. Send HTTP Request for eshop/PurchaseItem with
params
http://abcbooks.co.in/e
Online Shopping
Bill
Floppy Disc
Goods once sold will not be taken back Happy Shopping
Price: Rs. 240/-
3. Forwards the request to
a Server Side Program for
execution
4. Compose HTML output
Online Shopping Item
Name Floppy Disc
Quantity 12
Submit
http://abcbooks.co.in/e
5. Send HTTP Response which contains the HTML output
of the request
The Internet
Server Side Program
8/12/2019 Slides ASP.net La1010 Lc 01
15/59
Copyright 2008, Infosys Technologies Ltd.
Introduction to ASP
Active Server Pages (ASP) is a technology that enables the development
of dynamic web sites.
ASP files are HTML files with special tags containing source code thatprovide the dynamic content.
Active Server Pages enables server side scripting for IIS with nativesupport for both VBScript and Jscript.
ASP was the technology that was widely used for creating dynamic webpages prior to ASP.NET.
Example: The home page of ILITE
16
8/12/2019 Slides ASP.net La1010 Lc 01
16/59
Copyright 2008, Infosys Technologies Ltd.
Pros and Cons of ASP
Pros
No client-side constraints .Dynamically edit, change or add any content of a Web page .
Access any data or databases and return the results to a browser .Provide security since ASP code can not be viewed from the browser .
ASP programming minimizes the network traffic .
Cons ASP is only available for Windows (NT and 95).Not completely browser independent.Limited number of objects are available.Session state is cookie dependent.
17
8/12/2019 Slides ASP.net La1010 Lc 01
17/59
Copyright 2008, Infosys Technologies Ltd.
Difference between ASP and ASP.NET
Difference between ASP.NET and ASP
Files: File extension for ASP is .asp whereas for ASP.NET it is .aspx. In ASPglobal.asa file is used to manage some of the application events whereas in
ASP.NET global.asax file is used. In addition to global.asax file, web.config isalso used in ASP.NET.
Maintaining state between ASP and ASP.NET: .asp and .aspx pages cannotshare the same session state. To maintain session state between .asp and.aspx pages, it is necessary to use an alternative to the built-in session objectof either architecture.
Language Differences: VBScript is no longer used with ASP.NET. ASP.NETuses another .NET language VB.NET. Jscript, although still supported, hasundergone a lot of revision in order to be compliant with ASP.NET.
18
Education and Research
8/12/2019 Slides ASP.net La1010 Lc 01
18/59
ER/CORP/CRS/LA1010/003 Ver. No.: 4.0 Copyright 2008, Infosys Technologies Ltd.
Education and Research We enable you to leverage knowledge anytime, anywhere!
Introduction to IIS & ASP.NET
8/12/2019 Slides ASP.net La1010 Lc 01
19/59
Copyright 2008, Infosys Technologies Ltd. 20
Web Server IIS
Internet Information Services (IIS) 6.0 is a powerful Web server
Compatibility with Microsoft and Other ProductsRapid Installation and ConfigurationEasy Service ManagementEffortless Performance MonitoringEasy to Implement Security
Foundation for ASP.NETIIS serves as entry point for request from the client
8/12/2019 Slides ASP.net La1010 Lc 01
20/59
Copyright 2008, Infosys Technologies Ltd. 21
ASP.NET
Is the platform that we use to create Web applications and Web services
that run under IIS At a high level, ASP.NET is a collection of .NET classes that collaborate toprocess an HTTP request and generate an HTTP responseIt provides high level of consistency across web applicationsWe have components like web development tools
System.web namespace
8/12/2019 Slides ASP.net La1010 Lc 01
21/59
Copyright 2008, Infosys Technologies Ltd. 22
ASP. NET Framework
ASP.NET is a managed server-side framework
For building applications basedon HTTP, HTML, XML and SOAP
ASP.NET relies on IIS for anHTTP entry point
ASP.NET supports buildingHTML-based Web applications
Based on ASP.NET pages, Webforms and server-side controls
ASP.NET supports building Webservices
Based on Web service classesand WebMethods
ASP.NET
CLR
Windows 2000 or Windows 2003
IIS
HTML over HTTP
XML/SOAP over HTTP
Web Applicationclient
Web Service client
8/12/2019 Slides ASP.net La1010 Lc 01
22/59
Copyright 2008, Infosys Technologies Ltd. 23
Create a simple Web Application
Using Visual Studio 2008, create a simple web application
Create a web form that displays current date and time
8/12/2019 Slides ASP.net La1010 Lc 01
23/59
Copyright 2008, Infosys Technologies Ltd. 24
About .aspx page
Views
Source viewDesign viewSplit view
Understanding @Page Directive AutoEventWireUp
8/12/2019 Slides ASP.net La1010 Lc 01
24/59
Copyright 2008, Infosys Technologies Ltd. 25
Visual Studio 2008 support for ASP.NET 3.5
Provides a simpler way to create web forms applications
Supports multiple ways to open websitesSupports access of local installation of IISIIS is not a strict requirement since VS2008 ships with a local web server(makes IIS optional for at least testing &debugging)Does not compile the entire site into an assembly, instead uses ASP.NETdynamic compilation engine. Hence the changes to .aspx along withchanges to .cs or.vb files are immediately caught.
8/12/2019 Slides ASP.net La1010 Lc 01
25/59
Copyright 2008, Infosys Technologies Ltd. 26
Compilation Models in ASP.NET 3.5
ASP.NET 3.5 offers four different compilation models for a Web application:
Normal Asp.NET 1.x compilation- ASP.NET Web application, the code behind files were compiled into an assembly and
stored in the /bin directory. The Web pages (ASPX) were compiled on demand.
Deployment pre-compilation
- A new feature of ASP.NET 2.0 allows for full compilation of project prior to deployment
Full runtime compilation- ASP.NET 2.0 provides a new mechanism to compile the entire application at
runtime- The ASP.NET 2.0 compilation model also allows you to pre-compile all of the code
behind files for you and your application and still make updates to your code.
Note : Same compilation model continued for ASP.NET 3.5
8/12/2019 Slides ASP.net La1010 Lc 01
26/59
Copyright 2008, Infosys Technologies Ltd. 27
WebForms Overview
thisfile aspx
btnSubmit_Click() {...
thisfile aspx cs
d d d h d
8/12/2019 Slides ASP.net La1010 Lc 01
27/59
Copyright 2008, Infosys Technologies Ltd. 28
Code Beside Vs Code Behind
ASP.NET 3.5 introduces an improved runtime for code-behind pages that
simplifies the connections between the page and code.In this new code-behind model, the page is declared as a partial class,which enables both the page and code files to be compiled into a singleclass at runtime.
P i l Cl
8/12/2019 Slides ASP.net La1010 Lc 01
28/59
Copyright 2008, Infosys Technologies Ltd. 29
Partial Classes
The partial class in the code file contains the event handlers and thecustom code. The following is the sample code of a partial class
using System;
public partial class HelloBeside{
// Page_Load event code
void Send_Click(object sender, EventArgs e)
{
//Some code
}}
Education and Research We enable you to leverage knowledge anytime anywhere!
8/12/2019 Slides ASP.net La1010 Lc 01
29/59
ER/CORP/CRS/LA1010/003 Ver. No.: 4.0 Copyright 2008, Infosys Technologies Ltd.
We enable you to leverage knowledge anytime, anywhere!
Life-Cycle of a WebPage
W b F Lif C l E t
8/12/2019 Slides ASP.net La1010 Lc 01
30/59
Copyright 2008, Infosys Technologies Ltd. 31
Web-Form Life Cycle Events
Page_Init :
Page_Load :
Control_Event:
Page_Unload :
Page_Disposed :
This is called when page is initialized.We can declare some variables which need
to be initialized before page is loaded
The server controls are loaded in the page.This event is called every time when pageis loaded
This event is fired when control like buttonare clicked or changed
Final clean up is done
The page is released from memory
Events In A Life Cycle Of A Web Application
8/12/2019 Slides ASP.net La1010 Lc 01
31/59
Copyright 2008, Infosys Technologies Ltd. 32
Events In A Life Cycle Of A Web Application
Browser requests the page and User session starts
IIS receives request and redirects to aspnet_isapi.dll which in turn calls ASP. Net (asp_wp.exe) worker processThe ASP.NET worker process loads the assembly and creates aninstance of web formGenerates the HTML page, posts the response to browser and then it
destroys the instance of the web formBrowser receives the generated HTML
Advantages of ASP NET
8/12/2019 Slides ASP.net La1010 Lc 01
32/59
Copyright 2008, Infosys Technologies Ltd. 33
Advantages of ASP.NET
Executable portion of a web application is compiledEnriched tool support
Applications are based on CLROn the fly updates deployed without restarting serverBetter session managementIntegration with ADO.NETBuilt in features for cachingCreate XML Web servicesBrowser-independentLanguage-independent
Education and Research We enable you to leverage knowledge anytime, anywhere!
8/12/2019 Slides ASP.net La1010 Lc 01
33/59
ER/CORP/CRS/LA1010/003 Ver. No.: 4.0 Copyright 2008, Infosys Technologies Ltd.
y g g y , y
Different Controls in ASP.NET
Server Control
8/12/2019 Slides ASP.net La1010 Lc 01
34/59
Copyright 2008, Infosys Technologies Ltd. 35
Server Control
System. Object
System.Web.UI
System.Web.UI.Control
System.Web.UI.Web Controls System.Web.UI.HTMLControls
ASP NET Server Controls
8/12/2019 Slides ASP.net La1010 Lc 01
35/59
Copyright 2008, Infosys Technologies Ltd. 36
ASP.NET Server Controls
Control Properties Method Events
TextBox Enabled, MaxLength, ReadOnly,Text Focus TextChanged
CheckBox Checked,Enabled, Text Focus Checkedchanged
RadioButton GroupName, Checked,Enabled, Text Checkedchanged
Button,LinkButton,Im
ageButton
Enabled, PostBackUrl, Text Focus Click_Raised,
Command_RaisedImage AlternateText,DescriptionUrl,ImageUrl,
ImageAlign
ImageMap CircleHotSpot,PolygonHotSpot,RectangleHotSpot, ImageUrl
Focus Click_Raised
Hyperlink Enabled,ImageUrl,NavigateUrl,Target, Text
Panel DefaultButton,Direction,GroupingText,ScrollBars
List Controls
8/12/2019 Slides ASP.net La1010 Lc 01
36/59
Copyright 2008, Infosys Technologies Ltd. 37
List Controls
Control Properties Method Events
ListItem Enabled, Selected,Text,Value SelectedIndexChanged
DropDownList SelectedIndex, SelectedItem, SelectedValue SelectedIndexChanged
RadioButtonList SelectedIndex,SelectedItem,SelectedValue,RepeatColumns, RepeatDirection, AutoPostBack
SelectedIndexChanged
ListBox SelectedIndex,SelectedItem,SelectedValue, AutoPostBack
SelectedIndexChanged
CheckBoxList SelectedIndex,SelectedItem,SelectedValue,RepeatColumns,
SelectedIndexChanged
BulletedList SelectedIndex,SelectedItem,SelectedValue SelectedIndexChanged
Postback Event
8/12/2019 Slides ASP.net La1010 Lc 01
37/59
Copyright 2008, Infosys Technologies Ltd. 38
Postback Event
These events cause the web page to be sent back to the server for
immediate processingWhen page is posted back, the Page_Init, Page_Load events are handledThe page is submitted to the server and renders a new version of itselfback to the user
AutoPostBack is a Property of Server Controls
8/12/2019 Slides ASP.net La1010 Lc 01
38/59
Validation Controls
8/12/2019 Slides ASP.net La1010 Lc 01
39/59
Copyright 2008, Infosys Technologies Ltd. 40
Check the validity of data entered in associated server controls on the
client before the page is posted back to the server.Supports validation on client and serverClient-side validation is provided by a JScript library namedWebUIValidation.js
Validation Controls
8/12/2019 Slides ASP.net La1010 Lc 01
40/59
Copyright 2008, Infosys Technologies Ltd. 41
RequiredFieldValidator
RegularExpressionValidatorRangeValidatorCompareValidatorCustomValidatorValidationSummary
RequiredFieldValidator
8/12/2019 Slides ASP.net La1010 Lc 01
41/59
Copyright 2008, Infosys Technologies Ltd. 42
q
ControlToValidate Property
ErrorMessage Property
RegularExpressionValidator
8/12/2019 Slides ASP.net La1010 Lc 01
42/59
Copyright 2008, Infosys Technologies Ltd. 43
ControlToValidate Property
ErrorMessage PropertyValidationExpression Property
CompareValidator
8/12/2019 Slides ASP.net La1010 Lc 01
43/59
Copyright 2008, Infosys Technologies Ltd. 44
ControlToValidate Property
ErrorMessage PropertyType PropertyControlToCompare and ValueToCompare Property
Education and Research We enable you to leverage knowledge anytime, anywhere!
8/12/2019 Slides ASP.net La1010 Lc 01
44/59
ER/CORP/CRS/LA1010/003 Ver. No.: 4.0 Copyright 2008, Infosys Technologies Ltd.
User Controls
User Controls
8/12/2019 Slides ASP.net La1010 Lc 01
45/59
Copyright 2008, Infosys Technologies Ltd. 47
In addition to HTML and Web server controls, you can easily create your
own custom, reusable controlsEasy way to partition and reuse common user interface (UI) functionalityacross your ASP.NET Web applicationsCan be used for fragmented page cachingNot compiled until run time
Easy to Usedrag and drop them on the page and start using
Creating an User Control
8/12/2019 Slides ASP.net La1010 Lc 01
46/59
Copyright 2008, Infosys Technologies Ltd. 48
Add a new item ( select user control as a template) and give it a namewith the InfyHeading.ascxYou will get the following description in HTML view
8/12/2019 Slides ASP.net La1010 Lc 01
47/59
Copyright 2008, Infosys Technologies Ltd. 49
Drag and drop this user control on any other web-page. You will get thefollowing registration syntax in HTML view
Can you answer these questions?
8/12/2019 Slides ASP.net La1010 Lc 01
48/59
Copyright 2008, Infosys Technologies Ltd. 50
Suggest any real time scenario in which you think User Controls are bestfit?What are the advantages of using a web user control?
Summary
8/12/2019 Slides ASP.net La1010 Lc 01
49/59
Copyright 2008, Infosys Technologies Ltd. 51
How Web Applications workIntroduction to HTML and java ScriptIIS
ASP.NET Overview ASP.NET Programming modelDifferent Types Of Server Controls
HTML controlsWeb ControlsValidation ControlsUser Controls
8/12/2019 Slides ASP.net La1010 Lc 01
50/59
Copyright 2008, Infosys Technologies Ltd. 5252
Thank You
The contents of this document are proprietary and confidential to Infosys Technologies Ltd. and maynot be disclosed in whole or in part at any time, to any third party without the prior written consent ofInfosys Technologies Ltd.
2008 Infosys Technologies Ltd. All rights reserved. Copyright in the whole and any part of thisdocument belongs to Infosys Technologies Ltd. This work may not be used, sold, transferred, adapted,abridged, copied or reproduced in whole or in part, in any manner or form, or in any media, without theprior written consent of Infosys Technologies Ltd.
Education and Research We enable you to leverage knowledge anytime, anywhere!
8/12/2019 Slides ASP.net La1010 Lc 01
51/59
ER/CORP/CRS/LA1010/003 Ver. No.: 4.0 Copyright 2008, Infosys Technologies Ltd.
Appendix
Difference between ASP.NET 1.x, 2.0 and 3.5
8/12/2019 Slides ASP.net La1010 Lc 01
52/59
Copyright 2008, Infosys Technologies Ltd.
Difference between ASP.NET 1.x, 2.0 and 3.5
54
ASP.NET 1.x (VS 2003) ASP.NET 2.0 (VS 2005)
During the compilation of applications for .NET1.x, Visual Studio 2003 would automatically
compile only certain file types such as ASP.NETpages, Web services, user controls, HTTP
handlers, Resource files, and Global.asax classfiles. The rest of the files needed to be explicitlycompiled before finally publishing your code to
the web server.
In Visual Studio 2005, you no longer need to compile all the files into anassembly. The ASP.NET dynamic compilation engine allows to
automatically compile applications, that includes .aspx, .cs, .vb files. Thatmeans, simply create an application and publish it.
For modifying an application, you need to openthe entire project, make changes, and need torecompile again to publish the code to the web
server.
You just need to open the individual file which you want to make thechanges, and publish the code to the web server without having to
recompile.
Difference between ASP.NET 1.x, 2.0 and 3.5(contd..)
8/12/2019 Slides ASP.net La1010 Lc 01
53/59
Copyright 2008, Infosys Technologies Ltd. 55
ASP.NET 1.x (VS 2003) ASP.NET 2.0 (VS 2005) The code-behind model requires
an IIS virtual directory.The code-behind model can directly access the local installation of IIS.
The code-behind model lackssupport for FTP, local file systems,
and direct IIS access.
The code-behind model has multiple ways to open Web sites.
It requires IIS on the development
computer.
It already has a built-in Web server.
Unable to open individual pagesoutside the project.
Need not open the entire project; you can open individual pages outside the project, itis achieved through the compile-on-demand feature.
It requires explicit addition of filesto the project.
It eliminates the need to explicitly add files to the project.
In the life cycle of ASP.NET 1.xpage, the events are: Init, Load,PreRender, Unload
In ASP.NET 2.0, the NEW events are: PreInit, InitComplete, PreLoad, LoadComplete,PreRenderComplete.
Difference between ASP.NET 1.x, 2.0 and 3.5(contd..)
8/12/2019 Slides ASP.net La1010 Lc 01
54/59
Copyright 2008, Infosys Technologies Ltd.
Difference between ASP.NET 1.x, 2.0 and 3.5
The new features added into ASP.NET 3.5 apart from ASP.NET 2.0features are:
ASP.NET AJAX With ASP.NET AJAX, developers can quickly create pages with sophisticated,
responsive user interfaces and more efficient client-server communication by simplyadding a few server controls to their pages. Previously an extension to the ASP.NET
runtime, ASP.NET AJAX is now built into the platform and makes the complicatedtask of building cross-platform, standards based AJAX applications easy.
New ListView and DataPager Controls WCF Support for RSS, JSON, POX and Partial Trust LINQ and other .NET Framework 3.5 Improvements
56
RangeValidator
8/12/2019 Slides ASP.net La1010 Lc 01
55/59
Copyright 2008, Infosys Technologies Ltd. 57
Properties Description
ControlToValidate Used to specify the ID of the control that is to be validated
ErrorMessage Used to specify the error message that is displayed in theValidationSummary control
Type Used to specify the data type of values
MaximumValueUsed to specify the maximum value in a range of values
MinimumValue Used to specify the minimum value in a range of values
Method Description
ValidateUsed to perform validation and set the IsValid property
ValidationSummary
8/12/2019 Slides ASP.net La1010 Lc 01
56/59
Copyright 2008, Infosys Technologies Ltd. 58
Properties Description
HeadTextUsed to set the text that will be displayed at the top of
theSummary
ShowMessageBoxUsed to display the error message in a pop-up message
boxwhen the value of this property is true
ShowSummary Used to enable and disable the summary of errormessage
Rich Controls
8/12/2019 Slides ASP.net La1010 Lc 01
57/59
Copyright 2008, Infosys Technologies Ltd. 59
Control Properties Method EventsFileUpLoad Enabled, FileName HasFile,
PostedFile, SaveAsFocus, SaveAs
Calendar SelectedDate, SelectedDates,SelectionMode, TodaysDate,
DayRender,Selection
Changed,AdRotator ImageUrlFleild AdCreated
MultiView ActiveViewIndex, Views GetActiveView, Set
ActiveView
ActiveViewChanged
DateTime
8/12/2019 Slides ASP.net La1010 Lc 01
58/59
Copyright 2008, Infosys Technologies Ltd. 60
The DateTime value type represents dates and times with values rangingfrom 12:00:00 midnight, January 1, 0001 Anno Domini (Common Era) to11:59:59 P.M., December 31, 9999 A.D. (C.E.)Few properties:
TodayNowDate
Few Methods: AddDays() AddMonths()Compare()ToLongDateString()
ToShortDateString()
8/12/2019 Slides ASP.net La1010 Lc 01
59/59