WebParts- ASP.NET , Web-.
. , , . HTML- . HTML.
, ASP.NET Web Forms , . , HTML, .
ASP.NET Web Forms . - Page , , . - Control . , , . , ASPX- . , Panel, .
:
4.6
.
, Page Control Controls, . , , , .
, ASP.NET Web Forms Controls, . , Panel, , , , Button, Label , ? , Controls . , Controls . HTML-.
|
|
HTML- . ASP.NET Web Forms ( Page) "Render", HTML-. , "html", "head", "body" . Controls. , Controls, "RenderControl". . HTML- . , , "RenderControl" Controls, "RenderControl" . , Controls . , HTML-, HTML-. .
4.7 HTML- Page
, HTML- , HTML-.
, - , . :
- (user control);
- (custom server control).
(user control) - -. , HTML- . , , . , , , , . , . , .
, "Add New Item", "Web User Control".
4.8 C
(ascx) (cs). - (aspx) Control . .
|
|
, web-. HttpContext, Application, Session, ViewState, Request,Response, Server ..
- ASP.NET Web Forms.
. . Register, . Register :
4.2 Register
Src | ; |
TagPrefix | , ; |
TagName | , . |
, .
. .NET Framework, HTML-. , -, . , , " " , .
System.Web.UI.Control. Control , , ID,ViewState Controls. - Control Render. HtmlTextWriter. , . HtmlTextWriter HTML- , .
HtmlTextWriter HTML . HTML- , .
- AddAttribute() AddStyleAttribute() HTML- . HTML-, . HtmlTextWriterAttribte ( AddAttribute) HtmlTextWriterStyle ( AddStyleAttribute);
- RenderBeginTag() HTML- . HtmlTextWriterTag;
- RenderEndTag() HTML- , HTML- ( RenderBeginTag). HTML- ;
|
|
- WriteBeginTag() RenderBeginTag(), , WriteBeginTag() (">"). HTML- ;
- WriteAttribute() HTML- HTML-, WriteBeginTag;
- WriteEndTag() (">") HTML-, WriteBeginTag().
-
, , , HTML- .
. Register. , , :
4.3 Register
Namespace | , , ; |
Assembly | , ( ); |
TagPrefix | , . |
TagName , , . .
, . , Register "" ASPX- .
.
, ASP.NET Web Forms - .
ASP.NET Web Forms. HTML-. . HTML . . -, HTML-. . Register, ASPX, .
4.5
, . , . , . . , , . - . ASP.NET , . , . ASP.NET :
|
|
- - ;
-
ASP.NET Web Forms, . , :
- , ;
- , - HTML;
- , .
, . , .
, HTML. , , . , .
HTML , . , , .
(4.9).
: