.NET framewotk

06/09/2010 21:18


The sequences in which the ASP.net events processed:

1) Page_Init: It is executed first time only, when the page is started

2) Page_Load: It is executed many times whenever request of the page is made

3) Control events

4) Page_Unload event

 

Page_Load  Loads all full events except the view-state event

Page_Init  Allows the access of all events

 

IsPostBack

Page object has IsPostBack property to find whether page is posted back or not

 

Two directives:

1)@Page directives:

It specifies page specific attributes

2)@Register directives:

It informs to the compiler whenever custom server control is added to the page

 

SmartNavigation property:

It is one of the feature of the ASP.NET to prevent

l) Flickering

2) Redrawing

When  page is posted back.

But , it is suitable for IE browser(Internet Explorer-IE)

 

Creation of custom controls in ASP.NET

Use controls are created using .ASCX file. It consists of  two steps:

i)Place .ascx file in project:

<%@Register Tagprefix= “Accounting”  Tagname=  “footer”  src=”Footer.ascx”%>

 

ii)use Accountingfoooter by

<Accounting:footer runat=”server”/>

 

To enable automatic paging in data grid

 It consists of 2 steps:

i)Set “AllowPaging “is true

ii) PageIndexChanged event click “current pageindex”

 

GLOBAL .ASAX file uses:

i)It executes ASP.NET application level events

ii)It sets ASP.NET application level variables

 

web.congif: file apply setting of each web application

machine.config: file apply setting of all ASP.NET applications

 

 

The sequences in which the ASP.net events processed:

1) Page_Init: It is executed first time only, when the page is started

2) Page_Load: It is executed many times whenever request of the page is made

3) Control events

4) Page_Unload event

 

Page_Load  Loads all full events except the view-state event

Page_Init  Allows the access of all events

 

IsPostBack

Page object has IsPostBack property to find whether page is posted back or not

 

Two directives:

1)@Page directives:

It specifies page specific attributes

2)@Register directives:

It informs to the compiler whenever custom server control is added to the page

 

SmartNavigation property:

It is one of the feature of the ASP.NET to prevent

l) Flickering

2) Redrawing

When  page is posted back.

But , it is suitable for IE browser(Internet Explorer-IE)

 

Creation of custom controls in ASP.NET

Use controls are created using .ASCX file. It consists of  two steps:

i)Place .ascx file in project:

<%@Register Tagprefix= “Accounting”  Tagname=  “footer”  src=”Footer.ascx”%>

 

ii)use Accountingfoooter by

<Accounting:footer runat=”server”/>

 

To enable automatic paging in data grid

 It consists of 2 steps:

i)Set “AllowPaging “is true

ii) PageIndexChanged event click “current pageindex”

 

GLOBAL .ASAX file uses:

i)It executes ASP.NET application level events

ii)It sets ASP.NET application level variables

 

web.congif: file apply setting of each web application

machine.config: file apply setting of all ASP.NET applications