2
這裏是我的代碼,我想在加載/刷新應用程序時自動調用我的自定義方法(Application_My()
)/每次像Application_OnEndRequest()
一樣刷新。如何在global.asax中自動調用自定義方法
在此先感謝。
<%@ Application Language="C#" %>
<script runat="server">
// THis code will be executed automatically when page is reloaded everytime
/*protected void Application_OnEndRequest()
{
Response.Write("Thsi page is executed on=" + DateTime.Now.ToString());
}*/
// how to call below method automatically when page is reloaded everytime
//such as above
protected void Application_My()
{
Response.Write("Hi welcome");
}
protected void Application_Start(object sender, EventArgs e)
{
}
protected void Session_Start(object sender, EventArgs e)
{
}
protected void Application_BeginRequest(object sender, EventArgs e)
{
}
protected void Application_AuthenticateRequest(object sender, EventArgs e)
{
}
protected void Application_Error(object sender, EventArgs e)
{
}
protected void Session_End(object sender, EventArgs e)
{
}
protected void Application_End(object sender, EventArgs e)
{
}
你遇到了什麼問題? –
它很不清楚你要求什麼。應用程序只能啓動和停止,不能重新加載或刷新。 – Aristos