How to write encoded text on the web page in ASP.NET

This ASP.NET tutorial explains how to write encoded text on the web page in ASP.NET.

When you want to write encoded text on the web page you should use the Literal control, because it does support a property that is not supported by the Label control: the Mode property. The property enables you to [...]

How to associate a Label with a TextBox or other Form control in ASP.NET

This ASP.NET tutorial explains how to associate a Label with a TextBox or other Form control in ASP.NET.

The next code shows how you can attach an asp:Label control with the asp:TextBox. In this case when the user clicks the Label the application will focus on the TextBox.

 

TestAssociate.aspx

<%@ Page Language=”vb” AutoEventWireup=”false” CodeBehind=”TestAssociate.aspx.vb” Inherits=”TextChange.TestAssociate” %>

<!DOCTYPE [...]

How to use different colored highlights in a select menu with CSS

This ASP.NET tutorial explains how to use different colored highlights in a select menu with CSS.

You can assign classes to menu options, to create multiple background colors within the drop-down color. In this case you need to set only the color and background-color properties for a menu item. The next two test files show this:

 

File test.css

.blue [...]

How to set Meta Tags in ASP.NET 4.0

This ASP.NET 4 tutorial explains 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 [...]

How to create new aspx web page

This ASP.NET tutorial explains how to create new aspx web page in Visual Studio.

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 [...]

ASP.NET Versions

The ASP.NET Versions are:

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, [...]

How to make 301 redirect in ASP.NET 4.0

This ASP.NET tutorial explains 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 [...]

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 [...]

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 [...]

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 [...]