ASP. NET-Web Server Control

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.