Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WPF
  4. How I get Application_Exit Eventhandler in javascript code

How I get Application_Exit Eventhandler in javascript code

Scheduled Pinned Locked Moved WPF
javascript
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • X Offline
    X Offline
    xodeblack
    wrote on last edited by
    #1

    How I get Application_Exit Eventhandler in javascript code.... I mean when Application_Exit Eventhandler fires how I notify in javascript

    D 1 Reply Last reply
    0
    • X xodeblack

      How I get Application_Exit Eventhandler in javascript code.... I mean when Application_Exit Eventhandler fires how I notify in javascript

      D Offline
      D Offline
      Daniel Vaughan
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups