ASP.NET PageProperties
Control Standard Properties Reference Manual
Definition and Usage
The Page property gets a reference to the Page instance that contains the control. The value of this property reflects the name of the .aspx file that contains the control.
Example
The following example displays the Page that contains the Button control:
<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>
<form runat="server" >
<asp:Button ID="button1" OnClick="Button1_Click"
Text="Get Page" runat="server" />
</form>
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>
Demo Example »
Control Standard Properties Reference Manual Other Extensions