asp.net 4.0

How to turn on View state encryption for an individual page

Software developer can turn on encryption for an individual page using ViewStateEncryption-Mode property of the Page directive:

<%@Page ViewStateEncryptionMode=”Always”>

The developer can set the same attribute in a configuration file:

<configuration xmlns =https://scemas.microsoft.com/.NetConfiguration/V2.0>
    <system.web>
        <pages viewStateEncryptionMode=”Always”>
        …
    </system.web>
</configuration>

 

Note: Encryption imposes a performance penalty, because the web server will perform the encryption and decryption with each postback.  Don’t encrypt view state if you don’t need to …

Learn more

How to use ViewState in VB.NET

You as software developer can use code to add information directly to the view state collection of the containing page and recover it later after the page is posted back. The type of information you can store includes not only the simple data types, but your custom objects too.   The view state collection is provided by ViewState property …

Learn more

How to use ViewState in C#

You as software developer can use code to add information directly to the view state collection of the containing page and recover it later after the page is posted back. The type of information you can store includes not only the simple data types, but your custom objects too.   The view state collection is provided by ViewState property …

Learn more

ASP.NET Versions

ASP.NET 1.0

Object-oriented web application development supporting inheritance, polymorphism and other standard OOP features.
Based on Windows programming; the developer can make use of DLL class libraries and other features of the web server to build more robust applications that do more than simply rendering HTML.

ASP.NET 1.1

Mobile controls.
Automatic input validation.

ASP.NET 2.0

New data controls (GridView, FormView, DetailsView).
New technique for declarative data …

Learn more

ASP.NET 4.0 Hosting Service

ASP.NET 4 Hosting Benefits

Visual Studio 2010 and .NET Framework 4 are the last generation developer tools from Microsoft.

ASP.NET 4 introduces a number of features that improve core ASP.NET services such as output caching and session-state storage.
jQuery Included with Web Forms and MVC.
Web Forms has been a core feature in ASP.NET since the release of ASP.NET 1.0. Many enhancements …

Learn more

How to use pager in GridView control

The GridView control displays a pager bar when the AllowPaging property is set to true. Developer can control characteristics of the pager to a large extent, through the <PagerSettings> and <PagerStyle> tags or their equivalent properties. The GridView control’s pager supports first and last page buttons and lets developer assign an image to each button.  The pager can …

Learn more

Events in GridView control

Event
Description

PageIndexChanging, PageIndexChanged
Both events arise when one of the pager buttons is clicked. They fire before and after the grid control handles the paging operation.

RowCancelingEdit
The event arises when the Cancel button of a row in edit mode is clicked, but before the row exits edit mode.

RowCommand
Arises when …

Learn more

Template properties of GridView control

Property

Type

Description

EmptyDataTemplate

 

ITemplate

The property is used to indicate the template content to be rendered when the control is bound to an empty source. This property takes precedence over EmptyDataText if both are set. If neither is set, the grid isn’t rendered if bound to an empty data source.

PagerTemplate

 

ITemplate

The property …

Learn more