Anda di halaman 1dari 11

ASP.NET  ASP +.

NET framework

• Support of base class library


• Support of .net language
• Support of runtime (i.e. CLR)

Difference between ASP and


ASP.NET

ASP:
1. Extension of file is .asp
2. It supports scripting languages
like vbscript, java script.
3. It is not compiler based but
interpreter based.
4. No proper memory
management.
5. Default language is vbscript.
6. Asp.dll is required for
processing.
7. Script tag can have ordinary
statements and subprograms.
8. InPage techinque
ASP.NET:
1. Extension of file is. .Aspx.

2. It supports .net languages &

scripting languages, i.e.VB.NET,


C#. NET, VJ#. NET
Javascript&vbscript
3. It is compiler based.
4. Memory management is proper.
5. Default language is VB.NET
6. ASPNET_ISAPI.DLL,

ASPNET_WP.EXE AND
SYSTEM.WEB.DLL is required
for processing.
7. Script tag can have only
subprograms and delimiters can
have only ordinary statements.
8. Supports InPage and
CodeBehind Techinque

In Asp.Net “WebPages should follow


only one language implementation”.
When it comes to compilation the
controls within the script tag will be
processed first.

ASP.NET supports two types of


webpage developments.
1. In page technique
2. Code behind technique

When we are providing user interface


code and logic part code within a
single file. ASPX, then it is called as
In page technique.

When we are providing user interface


code in. ASPX and logic part code
within a single file. Dll, then it is
called as code behind technique.

SERVER SIDE CONTROLS

When it comes to server side control,


the instance of the control will be
created on the server machine so, all
the properties of the control are
accessible within the server side
program.
Server side controls can be classified
into two types.
1. Html server controls
2. Web server controls
Html Server controls:
These controls will follow the same
syntax of html client side controls
and provides the same object model.
Microsoft provides this towards
migration process.

Client side control:


<Input type = text name=t1>
Server side Control:
<Input type = text name= t1, id=”t1”
runat=server>

By adding Id and runat attributes


client side controls can be migrated to
Html server controls.

For button,
Client side scripting we use Onclick ()
Server side scripting we use
OnServerClick ()

Server side programs will provide


more flexibility in the programming.
This makes jobs of the programmer
very easier.
It will provide view state.
All this controls after processing on
the server machine will produce html
client side control, this will be send to
the browser, so that it will be
presented to the user.

Web Server Controls:


It provides very advanced controls as
compared to Html server Controls.
It provides .Net framework object
model. This model is very rich as
compared to HTML object model. It
supports data bounded columns like
datagrid.
Web controls are divided into 4 types.

1. Intrinsic controls
a. Label
b. Textbox
c. Checkbox
d. Radio button
e. Button
f. Link button
g. Image button
h. Hyperlink
i. List box
j. Dropdown list
Rich controls
k. Calendar
l. Ad rotator

2. Validation controls
a. Required field validator
b. Range validator
c. Regular expression validator
d. Compare validator
e. Custom validator
f. Validation summary

3. List controls
a. Datagrid
b. Datalist
c. Repeater

Intrinsic controls
Syntax:
<Asp: (control name) id=”-----“ run
at=”server” + properties/>
E.g. <asp: textbox----------text
mode=”single line/ multi line/
password”…>

The three button controls are going to


perform same things i.e. post back
(submission page) but appearance will
be different.

When it comes to visual studio. Net,


each asp.net web application will be
provided with a virtual directory as
well as a physical directory.

When the client sends a request for a


particular web page (let say
webform1.aspx), the class will be
created
Inheriting from webform1 class
available within .dll, after performing
the execution, the output will be sent
to client browser.

Advantages of code behind technique:


1. The logic part will be available in
compile form, so the execution
will be faster as compare to
inpage technique.
2. A parallel development can be
possible with user interface code
and logic part code, so the
application development will be
faster.

When we are using textbox with


password type, then the view state
will not be maintained.
Response. Redirect ()
It is an httpheader which instructs or
commands the browser to make call
to particular browser.
If the web page is available within
same virtual directory or website you
can provide only web page name, if
the web page available within another
virtual directory or website, then it
requires complete URL.

Redirect method will have more


number of trips between client and
web server, to reduce this in ASP 3.0
server. Transfer () method is
provided.
Server transfer method can be used if
the page is available within same
virtual directory or website.

Anda mungkin juga menyukai