0% found this document useful (0 votes)
34 views

Ms. Ashwini Rajendra Kulkarni

This document provides an overview of ASP.Net compared to ASP and describes some of the key features and controls in ASP.Net. It notes that ASP.Net is a compiled language that supports CLR while ASP is a scripting language. It also mentions that ASP.Net reduces code, is easier to write and execute, supports validation controls, and works easily with ADO.Net. The document then describes how ASP and ASP.Net pages work, the page lifecycle in ASP.Net, and various controls like textboxes, buttons, dropdownlists and placeholders.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views

Ms. Ashwini Rajendra Kulkarni

This document provides an overview of ASP.Net compared to ASP and describes some of the key features and controls in ASP.Net. It notes that ASP.Net is a compiled language that supports CLR while ASP is a scripting language. It also mentions that ASP.Net reduces code, is easier to write and execute, supports validation controls, and works easily with ADO.Net. The document then describes how ASP and ASP.Net pages work, the page lifecycle in ASP.Net, and various controls like textboxes, buttons, dropdownlists and placeholders.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 19

ASP.

Net

Ms. Ashwini Rajendra Kulkarni

Indira Institute Of Management,


Pune 1
ASP & ASP.Net
Scripting Language Compiled Language
Html & code part is Html & code part is
same diff.
Does not support CLR Supports CLR
Only html controls are Html & web controls
provided are provided
Does not support XML XML supports
.asp ext .aspx ext
2
ASP.Net
Next version of asp
Executes on the server side only
Reduces the large amount of code
Easy to write and execute
Fast execution
Validation controls are provided therefore
asp.net validates code without writing a single
line of code
Easily work with ado.net
3
How asp page works?
Client send request to server through
browser
Server check it whether it is available in the
hard drive
If yes then read the characters/ code
Then the data is send to browser
Browser converts these characters into web
page forms and display/send to the client.
4
How asp.net page works?
Client send request to server through
browser
Server check its extension .aspx whether it is
available in the hard drive
Then debug and execute that code into CLR
the data is send to browser
Browser send to the web page format to the
client.
5
ASP.Net Features
Easy programming
Flexible language – ASP only supports interpreted
VB script, Jscript while as asp.net supports more
than 25 .net languages
Great tool support
Text editor , notepad etc
Complied execution
Reliable – asp.net ensures that your application is
always available to your users.
easy deployment
Supports XML
6
ASP.Net controls
- HTML control
- Web form control
intrinsic controls
validation controls
ritch text controls
list bound controls

7
ASP.Net controls
-- intrinsic controls – text, label, list box, combo
box, panel etc
- validation controls
required field validator
range validator
compare validator
regular expression validator
etc.
8
Code Behind File
- the design and html views define only how
pages works.
- To define how it behaves you need to write
vb.net code
- vb.net code goes into separate file called as
code behind file.

9
ASP.Net page Life cycle
- page-initialization
- page-load
- page-preRender
- page-unload
- Page-dispose

10
page-initialization – server controls are
initialized
page-load – server controls are loaded in
page object
page-preRender – to render the page object
page-unload – page is unloaded from
memory
Page-dispose – page object is released from
the memory
11
page-initialization – server controls are
initialized
page-load – server controls are loaded in
page object
page-preRender – to render the page object
page-unload – page is unloaded from
memory
Page-dispose – page object is released from
the memory
12
Textbox

Object
  Control
   WebControl
    Textbox

Columns
MaxLength
ReadOnly
Rows
Text
TextMode - single line, multiline or a password control
Wrap
e.g.
Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Button1.Click

TextBox1.Text = "Microsoft“

End Sub
End Class

13
Buttons
A Button Web Server control is a control which we click and release to perform
some action.

 Object
  Control
   WebControl
    Button

LinkButton 

Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As


System.EventArgs) Handles LinkButton1.Click

TextBox1.Text = "Link Button“

End Sub

14
DropDownList 

Protected Sub Button2_Click(ByVal sender As Object, ByVal e A


Handles Button2.Click
DropDownList1.Text = "Operating system"
DropDownList1.Items.Add("Unix")
DropDownList1.Items.Add("Windows")
DropDownList1.Items.Add("DOS")
End Sub

15
ListBox   
CheckBox
CheckBoxList
RadioButtonList  
RadioButton
Panel control is used to contain other controls
PlaceHolder a place holder when we add controls at run time

16
PlaceHolder a place holder when we add controls at run time

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)


Handles Button1.Click

Dim Textbox2, Textbox3 As New System.Web.UI.WebControls.TextBox


Textbox2.Text = "Hi"
Textbox3.Text = "Hello"
PlaceHolder1.Controls.Add(Textbox2)
PlaceHolder1.Controls.Add(Textbox3)
End Sub

17
Calendar

Protected Sub Button2_Click(ByVal sender As Object, ByVal e As


System.EventArgs) Handles Button2.Click
TextBox1.Text = Calendar1.SelectedDate
End Sub

18
Thank You …
Ms. Ashwini Rajendra Kulkarni

Indira Institute Of Management,


Pune
19

You might also like