You can use multiple methods from ASP. NET Program Display information. One way is to use the <% = %> structure. Another method is to use the response. Write statement.
1. Use <% = %>
The simplest way to display information from ASP. net programs is to use the <% = %> structure. The value entered after the equal sign is written to the current page.
The 1.1 format is:
<% = Subsequent changes %>
1.2 examples:
1.2.1 subsequent generations: Public Partial Class Default_null: system. Web. UI. Page
{
/// <Summary>
/// Definition of changes shown on the front-end
/// </Summary>
Public String Svalue = "" ;
Protected Void Page_load ( Object sender, eventargs e)
{
/*
change the renewal value
Note :@"", indicates that the content in the quote is all a string
*/
svalue = @" This is the content to be displayed on the front-end,
here we have multiple rows of audio streams " ;
}< BR >}
1.2.2 previous Source Region: < Head Runat = "Server" >
< Title > Untitled faces </ Title >
</ Head >
< Body >
< Form ID = "Form1" Runat = "Server" >
< Div >
<! -- Svalue is the variable defined by the backend. This variable value will be shown here -->
<% = Svalue %>
</ Div >
</ Form >
</ Body >
</ Html >
1.2.3 result: This is an internal content to be displayed on the front-end. Here we have multiple lines for further demonstration.
2. response. Write statement
Another way to display text is to use the response. Write statement. You can place it in the <%> block.
Format 2.1
<% Response. Write ("content to be specified") %>.
The output of the response. Write statement is merged into the processing page. In this way, write Response. Write output is allowed. Code And the code can display text.
2.2 examples:
2.2.1 inbound from source region: < Head Runat = "Server" >
< Title > Untitled faces </ Title >
</ Head >
< Body >
< Form ID = "Form1" Runat = "Server" >
< Div >
<! -- Show content here -->
<% Response. Write ( " <Br> response. Write your response " ); %>
</ Div >
</ Form >
</ Body >
</ Html >
2.2.2 result:
code highlighting produced by actipro codehighlighter (freeware)
http://www.CodeHighlighter.com/
--> response. write into bytes