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