ASP. NET-Web server control is a server that understands ASP. NET labels. Such as HTML server controls, Web Server Control also causes the server,
ASP. NET-Web Server ControlWeb server controls are servers that are understood by special ASP. NET labels.
Such as HTML server controls, Web Server Control also causes the server,
They need to work on a runat = "server" attribute. However,
Web server controls do not necessarily map to any existing HTML elements,
They may be more complicated.
Syntax: <asp: control_name id = "some_id" runat = "server"/>
In the following example, we declare a button to control the server.
Aspx file. Then, we create an event handler's Click Event to change the text button: <script runat = "server">
Sub submit (Source As Object, e As EventArgs)
Button1.Text = "You clicked me! "
End Sub
</Script> <Body> <form runat = "server">
<Asp: Button id = "button1" Text = "Click me! "
Runat = "server" OnClick = "submit"/>
</Form> </body>
</Html> <script runat = "server">
Sub submit (Source As Object, e As EventArgs)
Button1.Text = "You clicked me! "
End Sub
</Script>
For more information, see www.111cn.cn/net/net.html.