WEB control usage

xiaoxiao2021-03-06  25

asp: checkbox:

ASP: Radiobutton: Note: The property Groupname and the HTMLINPUTRADIOBUTTON control Name property is equivalent !!

ASP: HYPERLINK:

Runat = "server" /> Note: 1 This control is differentUGATEURL and TARGATEURL differences ??? 2 can also add a name attribute example: then uses the following HTML elements to reach paragraph: Go to Paragraph implementation creation an "anchor" in other parts of this page. 3 Using Attributes properties :

Set and modify: myanchor.attributes ("name") = strnewname; 'Access: strnewname = myanchor.attributes ("name"); therefore, even if there is no NAME attribute, you can use this method to add a Name property. When you want to This kind of party when an element adds non-standard properties

Law is useful. 4 can also apply imageURL attributes to implement using images as superconnections.

ASP: LinkedButton: Note: The autopostback feature will be used by default, and the list will be returned to the server that generates the Click event. (Estimated this is life

Reason for LinkButton! Similar to Button) In addition, you cannot use the image and can only use text.

asp: image: (for displaying the image in the page, and accessing the control in the server code)

ASP: Panel: (Create a way to format

element) Some text inside the panel control! Note: For any server control, you can add your extra style properties using the Style collection: myControl.style ("Slector-name") = "value";

ASP: Label: Note: This control can customer service control automatic wrap problem, can be used in other Elements and text are arranged in a row! ASP: Button:

asp: imageButton:

ASP: TextBox: Note: Use the TextMode property to set a single line, multi-line and password mode

ASP: table: Note: (with server handler) INT INTROWS = Convert.Toint32 (SELROWS.VALUE); int INTCOLS = Convert.Toint32 (SELCOLS. Value); int introwcount; int inTcolcount; TableRow Objrow; Tablecell Objcell;

For (IntrowCount = 0; Introwcount <= Introws - 1; Introwcount ) {Objrow = New TableRow ();

For (intcolcount = 0; intColcount <= INTCOLS - 1; INTCOLCOUNT) {Objcell = New Tablecell (); Objcell.controls.Add (New Litralcontrol ("R" Introwcount.toString () "C"

INTCOLCOUNT.TOSTRING ()); objrow.cells.add (Objcell);} myControl.Rows.add (objrow);} // This ASP: Table and HTMLTABLE are: ASP: Table: Objcell.controls.add (New LiteralControl ("R" Introwcount.toString () "C"

INTCOLCOUNT.TOSTRING ())); htmltable: objcell.innerhtml = "r" Introwcount "C" intColcount; reason is that the HTMLTable control is an HTMLTableCell object, and the ASP: Table Objcell is TableCell object

ASP: LITERAL: (Configuring function: new literalcontrol ("string");) Note: This control has only one text property, it does not produce other outputs (For example, the HTML element is not generated) Therefore, when the required work is to

It is useful when putting it in the page. Example: generating output: a custom element ASP: PlaceHolder: