Asp.net-web server Control

Source: Internet
Author: User

Asp.net-web server Control Web server controls are servers that are specifically understood by the asp.net tag.

Like HTML server controls, Web server control is also created on the server,

They need a job that runat = "server" properties. However

Web server controls do not necessarily map to any existing HTML element.

They may be more complex factors.

syntax to create a Web server control is: <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 for the Click event that changes 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>
Sub Submit (Source as Object, e as EventArgs)
Button1. Text= "You clicked Me!"
End Sub
</script>

Reprint Please specify: www.111cn.net/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.