How to Create a Custom Control in ASP.NET

This ASP.NET tutorial explains how to create a custom control in ASP.NET.

If none of the existing ASP.NET server controls meet your requirements, then you can create a custom control by deriving from one of the base control classes.

Adding Custom Control to the Toolbox

1. Create a test Web Forms page. (WebForm1)
2. Using Tools menu, click Add/Remove Toolbox [...]

How to connect to MySQL database using ASP.NET hosting

This ASP.NET tutorial explains how to connect to MySQL database using ASP.NET hosting.

Many developers use ASP.NET with MySQL with their applicaions. If you use ASP.NET hosting services and some of ASP.NET languages as VB.NET or C# then you could connect to the MySQL databse using ODBC .net data provider.

Connect to MysQL database using C# on ASP.NET [...]

How to disable a button after click in ASP.NET

This ASP.NET tutorial explains how to disable a button after click in ASP.NET.

This is a very common scenario when you would like to disable button after click, so the user could not click it again if you need some time to do some task which takes longer time to be executed.

Disable a button after click in [...]

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