|
hey
guys, i need to control the global.asax from a separate web page. like
a simple button will disable the application start module without
restarting the whole system. this button is on a different webpage. any clue? |
Loading
|
hey
guys, i need to control the global.asax from a separate web page. like
a simple button will disable the application start module without
restarting the whole system. this button is on a different webpage. any clue? |
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Kirtan PatelPosted Dec 6, 2009, 1:40 PM
friend, check "Do you like this answer" check box if my answer helps you :)
Now Application Startup code will only execute when you make Status true else if make sttus false some other code will run .
Global.asax code
-------------------------
void Application_Start(object sender, EventArgs e)
{
if (Convert.ToBoolean(Session["AppStartStatus"]) == true)
{
//Code to Do Something While
}
else if (Convert.ToBoolean(Session["AppStartStatus"]) == false)
{
//Do Somthing if AppStartStatus is false
}
else if(Session["AppStartStatus"] == null)
{
//Make AppStart Status By default true
Session["AppStartStatus"] = true;
}
}
Page Code
------------------
protected void Button1_Click(object sender, EventArgs e)
{
// Stop the Application Start Code
Session["AppStartStatus"] = false;
}
Mark UyPosted Dec 13, 2009, 2:33 AM
i get a startup error saying that appstartstatus is not part of the current context. any help?
Mark UyPosted Dec 6, 2009, 1:13 PM
Kirtan PatelPosted Dec 6, 2009, 12:57 PM
What do you want to do Exactly ??? can you explain it in just Strait forward way ???