Close access to ASP. Net (2)

Source: Internet
Author: User

In the previous section, we briefly introduced the preparation environment of ASP +. In this section, we will talk about the syntax of ASP +. in fact, after you install NGWS, the documents it carries are the best course of learning ASP +. It is not difficult to learn ASP + because E is good enough and patient. these guys have learned a lot from here. Most of this article on ASP + syntax also comes from the original text of M $. Unfortunately, our server cannot be installed with NGWS, in some examples, the execution results are not very good. However, in some cases, I will display the execution results. Let's start this section :)
The suffix of an ASP + page is ". ASPX ". it can contain eight different syntax tagging elements. we will introduce these different syntaxes in this article and give an example to demonstrate their usage.

<%> And <% = %>
Have you used asp or asp. The following is a simple example. I don't think I can write the result after his execution, and everyone knows it. I will not talk about this much.
<% For (int I = 0; I <8; I ++)
{
%>
Hello World!
<% }%>
In the preceding example, the program between <%> is executed and the result is displayed. <% = "Hello World" %> is equal to <% Response. write ("Hello World") %>
Note: in C #, semicolon (;) is used as the separator, but we should pay attention to some things.

C # code
<% Response. Write ("Hello World"); %>
The semicolon here is required
<% = "Hello World"; %>
In this case, there will be some minor issues: the displayed result is "Response. Write (" Hello World ";);"
Correct

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.