输出页没有正确呈现
本文关键字:输出 | 更新日期: 2023-09-27 18:17:08
我创建了一个带有一些控件的页面。当我输入<% label。Text = "changed";%>",则在页面执行后不呈现Label的文本值。为什么?
<div>
<tagprefix:MD ID="CC" runat="server" />
<asp:TextBox runat="server" ID="TextBox1"/>
<asp:Button Text="button" ID="Button" runat="server" onclick="Button_Click" />
<%= "Hello..." %>
<% label.Text = "changed"; %> //working fine
<asp:Label ID="label" Text="text" runat="server" />
<% label.Text = "changed"; %> // do not work
</div>
string hello = "hello";
Response.Write( hello );
hello = "world"
为什么显示"hello"而不是"world" ?
这个问题的答案也是你的问题的答案。