Page.Application Propiedad
Definición
Importante
Parte de la información hace referencia a la versión preliminar del producto, que puede haberse modificado sustancialmente antes de lanzar la versión definitiva. Microsoft no otorga ninguna garantía, explícita o implícita, con respecto a la información proporcionada aquí.
Obtiene el objeto HttpApplicationState de la solicitud web actual.
public:
property System::Web::HttpApplicationState ^ Application { System::Web::HttpApplicationState ^ get(); };
[System.ComponentModel.Browsable(false)]
public System.Web.HttpApplicationState Application { get; }
[<System.ComponentModel.Browsable(false)>]
member this.Application : System.Web.HttpApplicationState
Public ReadOnly Property Application As HttpApplicationState
Valor de propiedad
Datos actuales de la clase HttpApplicationState.
- Atributos
Ejemplos
// 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();
}
' When this page is loaded, the source for the
' MyDataGrid control is obtained from Application state.
Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Dim Source As DataView = Application("Source")
MySpan.Controls.Add(New LiteralControl(Source.Table.TableName))
MyDataGrid.DataSource = Source
MyDataGrid.DataBind()
End Sub