[讨论]浏览aspx时无法显示控件,有原程序
浏览aspx时无法显示控件,在代码中添加了label和button,但是在IIS中浏览的时候却没有显示。<% @Page Language="C#"%>
<html>
<head>
<title>ASP.NET指令演示<title>
</head>
<body>
<script language="C#" runat="server">
private void Button1_Click(object sender,System.EventArgs e)
{
Label1.Text="ASP.net服务器控件单击事件代码执行演示";
}
</script>
<form id="Form1" method="post" runat="server">
<asp:Label id="Label1" runat="server">代码测试</asp:Label>
<br></br>
<asp:Button id="Button1" runat="server" Test="单击这里" onclick="Button1_Click"></asp:Button>
</form>
</body>
</html>