HtmlTextWriterAttribute Enum

Definition

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
HtmlTextWriterAttribute

Fields

Abbr 40

Specifies that the HTML abbr attribute be written to the tag.

Accesskey 0

Specifies that the HTML accesskey attribute be written to the tag.

Align 1

Specifies that the HTML align attribute be written to the tag.

Alt 2

Specifies that the HTML alt attribute be written to the tag.

AutoComplete 41

Specifies that the HTML autocomplete attribute be written to the tag.

Axis 42

Specifies that the HTML axis attribute be written to the tag.

Background 3

Specifies that the HTML background attribute be written to the tag.

Bgcolor 4

Specifies that the HTML bgcolor attribute be written to the tag.

Border 5

Specifies that the HTML border attribute be written to the tag.

Bordercolor 6

Specifies that the HTML bordercolor attribute be written to the tag.

Cellpadding 7

Specifies that the HTML cellpadding attribute be written to the tag.

Cellspacing 8

Specifies that the HTML cellspacing attribute be written to the tag.

Checked 9

Specifies that the HTML checked attribute be written to the tag.

Class 10

Specifies that the HTML class attribute be written to the tag.

Cols 11

Specifies that the HTML cols attribute be written to the tag.

Colspan 12

Specifies that the HTML colspan attribute be written to the tag.

Content 43

Specifies that the HTML content attribute be written to the tag.

Coords 44

Specifies that the HTML coords attribute be written to the tag.

DesignerRegion 45

Specifies that the HTML designerregion attribute be written to the tag.

Dir 46

Specifies that the HTML dir attribute be written to the tag.

Disabled 13

Specifies that the HTML disabled attribute be written to the tag.

For 14

Specifies that the HTML for attribute be written to the tag.

Headers 47

Specifies that the HTML headers attribute be written to the tag.

Height 15

Specifies that the HTML height attribute be written to the tag.

Href 16

Specifies that the HTML href attribute be written to the tag.

Id 17

Specifies that the HTML id attribute be written to the tag.

Longdesc 48

Specifies that the HTML longdesc attribute be written to the tag.

Maxlength 18

Specifies that the HTML maxlength attribute be written to the tag.

Multiple 19

Specifies that the HTML multiple attribute be written to the tag.

Name 20

Specifies that the HTML name attribute be written to the tag.

Nowrap 21

Specifies that the HTML nowrap attribute be written to the tag.

Onchange 22

Specifies that the HTML onchange attribute be written to the tag.

Onclick 23

Specifies that the HTML onclick attribute be written to the tag.

ReadOnly 24

Specifies that the HTML readonly attribute be written to the tag.

Rel 49

Specifies that the HTML rel attribute be written to the tag.

Rows 25

Specifies that the HTML rows attribute be written to the tag.

Rowspan 26

Specifies that the HTML rowspan attribute be written to the tag.

Rules 27

Specifies that the HTML rules attribute be written to the tag.

Scope 50

Specifies that the HTML scope attribute be written to the tag.

Selected 28

Specifies that the HTML selected attribute be written to the tag.

Shape 51

Specifies that the HTML shape attribute be written to the tag.

Size 29

Specifies that the HTML size attribute be written to the tag.

Src 30

Specifies that the HTML src attribute be written to the tag.

Style 31

Specifies that the HTML style attribute be written to the tag.

Tabindex 32

Specifies that the HTML tabindex attribute be written to the tag.

Target 33

Specifies that the HTML target attribute be written to the tag.

Title 34

Specifies that the HTML title attribute be written to the tag.

Type 35

Specifies that the HTML type attribute be written to the tag.

Usemap 52

Specifies that the HTML usemap attribute be written to the tag.

Valign 36

Specifies that the HTML valign attribute be written to the tag.

Value 37

Specifies that the HTML value attribute be written to the tag.

VCardName 53

Specifies that the HTML vcardname attribute be written to the tag.

Width 38

Specifies that the HTML width attribute be written to the tag.

Wrap 39

Specifies that the HTML wrap attribute be written to the tag.

Examples

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');")

Remarks

This enumeration is commonly used with the following methods of the HtmlTextWriter class: AddAttribute, GetAttributeName, IsAttributeDefined, RenderBeginTag.

Applies to

See also