Close access to ASP. Net (4)

Source: Internet
Author: User

Throughout the day, I spent some time talking about NGWS with my friends in my spare time. One day, I was finally woken up by lazy, who was still talking about NGWS ", in a hurry, download my "NGWS" again. After installing NGWS, I found that NGWS was renamed Micosoft. net, ASP + was renamed ASP. net. now, not only does window 2000 support installation and debugging of asp.net, but it can even be connected to the worst "Blast bar". As a result, we find that we are getting farther and farther away from the times ..... (Audience: do not get into the question) (at the same time, a UFO suddenly throws to the flying knife, and the flying knife immediately falls into the pool of blood .....)
WEB controls
According to the plan, we will talk about Web controls in this section. After half a day, I don't know how to define this web control. It is more difficult to understand than html controls, after all, HTML is too much like what we were familiar. The web control is indeed quite different from what we usually see. I don't know if you still remember what I said, that is, the ASP.net program is like a window in VBVC, add the required controls to these windows and then operate these controls. If you have learned a little about VBVC programming, it is not difficult to understand this. The web control in ASP.net is like the control in VBVC. We first set these controls on the page, and then control them through Page_Load and other custom events. Let's take a look at an instance. Let's take a simple Label control first.
The source code is as follows:
<% @ Page Language = "C #" %>
<% @ Import Namespace = "System. Data" %>
<Script Language = "C #" Runat = "Server">
Public void Page_Load (Object src, EventArgs e)
{
If (! Page. IsPostBack)
{
Label3.Text = "this is in italic and it is underlined ";
}
}
</Script>
<Html>
<Head>
<Title> test the Label Control </title>
</Head>
<Body>
<Bold> test the Label control: <br> </bold>
<Asp: label id = "label1" font-size = "9pt" font-bold = "true" forecolor = "red" runat = "server"> This is a red-bold text </asp: label> <br>

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.