Expand Minimize

Page.Application Property

Gets the HttpApplicationState object for the current Web request.

Namespace:  System.Web.UI
Assembly:  System.Web (in System.Web.dll)

[BrowsableAttribute(false)]
public HttpApplicationState Application { get; }

Property Value

Type: System.Web.HttpApplicationState
The current data in the HttpApplicationState class.

// When this page is loaded, the source for the 
// MyDataGrid control is obtained from Application state.
void Page_Load(object sender, EventArgs e ) {

    DataView Source = (DataView)(Application["Source"]);
    MySpan.Controls.Add(new LiteralControl(Source.Table.TableName));
    MyDataGrid.DataSource = Source;
    MyDataGrid.DataBind(); 
}

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft