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>