HtmlInputControl.Type Property

Gets the type of an HtmlInputControl.

Namespace: System.Web.UI.HtmlControls
Assembly: System.Web (in system.web.dll)

public:
property String^ Type {
	String^ get ();
}
/** @property */
public String get_Type ()

public function get Type () : String

Not applicable.

Property Value

A string that contains the type of an HtmlInputControl.

Use this property get the type of an HtmlInputControl.

The following table shows the different possible values for the Type property.

Value

Description

text

A text box for data entry.

password

A text box that masks user input.

checkbox

A check box that indicates a true or false condition.

radio

A radio button that indicates a selection from a mutually exclusive group of radio buttons.

button

A command button.

submit

A button that submits the form to the server.

reset

A button that clears the form.

file

A button that uploads a file.

hidden

A non-visible field on a Web page used to persist information between posts to the server.

image

An image button.

The following code example demonstrates how to use the Type property to determine the type of HtmlInputControl that was clicked.

No code example is currently available or this language may not be supported.

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show: