ASP.NET Page 属性
最后更新于:2022-03-26 23:27:23
ASP.NET Page 属性
定义和用法
Page 属性获取对包含控件的 Page 实例的引用。该属性的值反映了包含控件的 .aspx 文件的名称。
实例
下面的实例显示包含 Button 控件的 Page:
<script runat=”server”>
Sub Button1_Click(sender As Object, e As EventArgs)
Response.Write(“The Page containing the button is: “)
Response.Write(button1.Page)
End Sub
</script>
Sub Button1_Click(sender As Object, e As EventArgs)
Response.Write(“The Page containing the button is: “)
Response.Write(button1.Page)
End Sub
</script>
<form runat=”server” >
<asp:Button ID=”button1″ OnClick=”Button1_Click”
Text=”Get Page” runat=”server” />
</form>