How I get Application_Exit Eventhandler in javascript code
-
How I get Application_Exit Eventhandler in javascript code.... I mean when Application_Exit Eventhandler fires how I notify in javascript
Hi Kashif, You can call any JavaScript function on your page like so:
void Application_Exit(object sender, EventArgs e)
{
HtmlPage.Window.Invoke("OnSilverlightExit", new[] { "some data" });
}Here we see that the JavaScript function OnSilverlightExit is called and is passed a string parameter "some data". The JavaScript function can then do whatever you need.
function OnSilverlightExit(identifier) {
/* Do something. */
}There's some more information here[^] about communicating between a page in JavaScript with a Silverlight application. Cheers, Daniel
Daniel Vaughan Follow me on Twitter Blog: DanielVaughan.Orpius.com Open Source Projects: Calcium SDK, Clog Organization: Outcoder of PebbleAge