ASP.NET Tutorials for beginners

How to set Meta Tags in ASP.NET 4.0

To set the Meta Tags in ASP.NET 4 you should use the MetaKeywords and MetaDescription properties which are members of the Page class.

You can set these properties at run time, so you get the content from a database or other source, and which lets you set the tags dynamically.

You can also set the Keywords and Description properties in …

Learn more

How to create new aspx web page

To add a page to the Web site:
In Solution Explorer, right-click the Web site (for example, C:\HowToASPNET), and then click Add New Item.

The Add New Item dialog box is displayed.

In the template list, select Web Form.
In the Name box, type the name of the new aspx page, by example MyNewPage.
Click Add.

Visual Studio creates the new aspx page and opens …

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

How to make 301 redirect in ASP.NET 4.0

ASP.NET 4 adds a new RedirectPermanent helper method that makes it easy to make HTTP 301 Moved Permanently responses:

RedirectPermanent(“/newfile.aspx”);

Related TutorialsHow to install ASP.NET
How to Create a Custom Control in ASP.NET
ASP.NET User Controls
ASP.NET Pages
How to write encoded text on the web page …

Learn more

ASP.NET Server-side caching

ASP.NET offers a “Cache” object that is shared across the application and can also be used to store various objects.

The “Cache” object holds the data only for a specified amount of time and is automatically cleaned after the session time-limit elapses.

Related TutorialsHow to associate a Label with a TextBox or other Form control in ASP.NET
How to zip a …

Learn more

ASP.NET Performance

ASP.NET aims for performance benefits over other script-based technologies (as Classic ASP) by compiling the server-side code to one or more DLL files on the web server. This compilation happens automatically the first time a page is requested. This feature provides the ease of development offered by scripting languages with the performance benefits of a compiled binary. However, …

Learn more

ASP.NET Session state

Server-side session state is held by a collection of user-defined session variables that are persistent during a user session. These variables, accessed using the Session collection, are unique to each session instance. The variables can be set to be automatically destroyed after a defined time of inactivity even if the session does not end. Client-side user session is …

Learn more

ASP.NET View state

View state refers to the page-level state management mechanism, utilized by the HTML pages emitted by ASP.NET applications to maintain the state of the web form controls and widgets. The state of the controls is encoded and sent to the server at every form submission in a hidden field known as __VIEWSTATE. The server sends back the variable …

Learn more

ASP.NET Application State

Application state is held by a collection of shared user-defined variables. These are set and initialized when the Application_OnStart event fires on the loading of the first instance of the application and are available until the last instance exits.

ASP.NET Application state variables are accessed using the Applications collection, which provides a wrapper for the application state. Application state …

Learn more

ASP.NET State management

ASP.NET applications are hosted by a web server and are accessed using the stateless HTTP protocol. As such, if an application uses stateful interaction, it has to implement state management on its own. ASP.NET provides various functions for state management.

Conceptually, Microsoft treats “state” as GUI state. Problems may arise if an application needs to keep track of “data …

Learn more