MVC fragmented Knowledge Point records

Source: Internet
Author: User

---------------------------------------------------------------------------------------------------------

Embed the server code in the HTML file:

<Div>    <!--Single line Mark -@{var name = "Slark";} @{Response.Write ("single line:name is" + Name + "<BR/>");}<!--inline (inline) markers -Inline:today is: @DateTime. now.tostring ("Yyyy-mm-dd")<BR/>Inline:name is @name<BR/>    <!--Multi-line (multi-line) markers -@{var age = 25; Response.Write ("Multi-line:age is" + Age + "<BR/>"); }</Div>

Embed HTML code in the server code:

    • In razor tagged code, if there is a pair of HTML tags, then this tag and its contents will be treated as normal text output. such as <p>var name2 = "Slark";</p>
    • If there is "@:" in the code in the razor tag, the following line of code is treated as plain text output. such as @:var Name3 = "Slark"; <br/>
    • If there is a <text>...</text> tag in the code of the razor tag, its contents are treated as normal text output. such as <text> var name4 = "Slark"; <br/> var name5 = "Slark"; </text>

Source: http://www.cnblogs.com/slark/p/4161772.html

---------------------------------------------------------------------------------------------------------

MVC fragmented Knowledge Point records

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.