HtmlTextWriterAttribute Enum
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Specifies the HTML attributes that an HtmlTextWriter or Html32TextWriter object writes to the opening tag of an HTML element when a Web request is processed.
public enum class HtmlTextWriterAttribute
public enum HtmlTextWriterAttribute
type HtmlTextWriterAttribute =
Public Enum HtmlTextWriterAttribute
- Inheritance
Name | Value | Description |
---|---|---|
Accesskey | 0 | Specifies that the HTML |
Align | 1 | Specifies that the HTML |
Alt | 2 | Specifies that the HTML |
Background | 3 | Specifies that the HTML |
Bgcolor | 4 | Specifies that the HTML |
Border | 5 | Specifies that the HTML |
Bordercolor | 6 | Specifies that the HTML |
Cellpadding | 7 | Specifies that the HTML |
Cellspacing | 8 | Specifies that the HTML |
Checked | 9 | Specifies that the HTML |
Class | 10 | Specifies that the HTML |
Cols | 11 | Specifies that the HTML |
Colspan | 12 | Specifies that the HTML |
Disabled | 13 | Specifies that the HTML |
For | 14 | Specifies that the HTML |
Height | 15 | Specifies that the HTML |
Href | 16 | Specifies that the HTML |
Id | 17 | Specifies that the HTML |
Maxlength | 18 | Specifies that the HTML |
Multiple | 19 | Specifies that the HTML |
Name | 20 | Specifies that the HTML |
Nowrap | 21 | Specifies that the HTML |
Onchange | 22 | Specifies that the HTML |
Onclick | 23 | Specifies that the HTML |
ReadOnly | 24 | Specifies that the HTML |
Rows | 25 | Specifies that the HTML |
Rowspan | 26 | Specifies that the HTML |
Rules | 27 | Specifies that the HTML |
Selected | 28 | Specifies that the HTML |
Size | 29 | Specifies that the HTML |
Src | 30 | Specifies that the HTML |
Style | 31 | Specifies that the HTML |
Tabindex | 32 | Specifies that the HTML |
Target | 33 | Specifies that the HTML |
Title | 34 | Specifies that the HTML |
Type | 35 | Specifies that the HTML |
Valign | 36 | Specifies that the HTML |
Value | 37 | Specifies that the HTML |
Width | 38 | Specifies that the HTML |
Wrap | 39 | Specifies that the HTML |
Abbr | 40 | Specifies that the HTML |
AutoComplete | 41 | Specifies that the HTML |
Axis | 42 | Specifies that the HTML |
Content | 43 | Specifies that the HTML |
Coords | 44 | Specifies that the HTML |
DesignerRegion | 45 | Specifies that the HTML |
Dir | 46 | Specifies that the HTML |
Headers | 47 | Specifies that the HTML |
Longdesc | 48 | Specifies that the HTML |
Rel | 49 | Specifies that the HTML |
Scope | 50 | Specifies that the HTML |
Shape | 51 | Specifies that the HTML |
Usemap | 52 | Specifies that the HTML |
VCardName | 53 | Specifies that the HTML |
The following example uses the HtmlTextWriterAttribute enumeration with the AddAttribute method to add an Onclick
attribute to an HTML element and sets its value to ECMAScript code.
writer->AddAttribute( HtmlTextWriterAttribute::Onclick, "alert('Hello');" );
writer.AddAttribute(HtmlTextWriterAttribute.Onclick, "alert('Hello');");
writer.AddAttribute(HtmlTextWriterAttribute.Onclick, "alert('Hello');")
This enumeration is commonly used with the following methods of the HtmlTextWriter class: AddAttribute, GetAttributeName, IsAttributeDefined, RenderBeginTag.
Produto | Versões |
---|---|
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Comentários do .NET
O .NET é um projeto código aberto. Selecione um link para fornecer comentários: