ASP.NET Page properties
Definition and usage
The Page property retrieves a reference to the Page instance containing the server control.
The value of this property reflects the name of the .aspx file containing the server control.
Example
This example shows the Page containing 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>
Example
- Display the Page containing the Button control