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. Global.asax in Silverlight?

Global.asax in Silverlight?

Scheduled Pinned Locked Moved WPF
question
7 Posts 3 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.
  • D Offline
    D Offline
    devvvy
    wrote on last edited by
    #1

    Global.asax in Silverlight? I see there's a web.config (to my delight actually, just installed Silverlight it's my first try) but where would you put global init code in a silverlight app? Thanks!

    dev

    M 1 Reply Last reply
    0
    • D devvvy

      Global.asax in Silverlight? I see there's a web.config (to my delight actually, just installed Silverlight it's my first try) but where would you put global init code in a silverlight app? Thanks!

      dev

      M Offline
      M Offline
      Mark Salsbery
      wrote on last edited by
      #2

      Silverlight runs client-side...initialization is the same as for any stand-alone application. The System.Windows.Application class is the entry point... Mark

      Mark Salsbery Microsoft MVP - Visual C++ :java:

      D 1 Reply Last reply
      0
      • M Mark Salsbery

        Silverlight runs client-side...initialization is the same as for any stand-alone application. The System.Windows.Application class is the entry point... Mark

        Mark Salsbery Microsoft MVP - Visual C++ :java:

        D Offline
        D Offline
        devvvy
        wrote on last edited by
        #3

        Wait a minute I just added Global.asax and Application_Start to my silverlight project My new silverlight project even came with good old web.config - I don't even need to rewrite code so it feeds on XAML as in case of WPF. thanks

        dev

        M 1 Reply Last reply
        0
        • D devvvy

          Wait a minute I just added Global.asax and Application_Start to my silverlight project My new silverlight project even came with good old web.config - I don't even need to rewrite code so it feeds on XAML as in case of WPF. thanks

          dev

          M Offline
          M Offline
          Mark Salsbery
          wrote on last edited by
          #4

          devvvy wrote:

          I just added Global.asax

          devvvy wrote:

          My new silverlight project even came with good old web.config

          Are you referring to the sample web project created to host your Silverlight app? If so, that is a web app, not the Silverlight app. Silverlight apps don't use a web.config - they run on the client.

          Mark Salsbery Microsoft MVP - Visual C++ :java:

          D 1 Reply Last reply
          0
          • M Mark Salsbery

            devvvy wrote:

            I just added Global.asax

            devvvy wrote:

            My new silverlight project even came with good old web.config

            Are you referring to the sample web project created to host your Silverlight app? If so, that is a web app, not the Silverlight app. Silverlight apps don't use a web.config - they run on the client.

            Mark Salsbery Microsoft MVP - Visual C++ :java:

            D Offline
            D Offline
            devvvy
            wrote on last edited by
            #5

            goodness... i looked closer. The web.config resides in ASP.NET project which is hosting the xap/Silverlight app. Also, I have a class library which I cannot reference from within the Silverlight project (not to mention log4net/nhibernate/spring.net)

            dev

            B 1 Reply Last reply
            0
            • D devvvy

              goodness... i looked closer. The web.config resides in ASP.NET project which is hosting the xap/Silverlight app. Also, I have a class library which I cannot reference from within the Silverlight project (not to mention log4net/nhibernate/spring.net)

              dev

              B Offline
              B Offline
              Braulio Dez
              wrote on last edited by
              #6

              Jejejeje, it's normal to have that confusion when you start developing in Silverlight. The most similar thing that you can fin in SL is the app object, there you will have global events and method (when the app starts which page to show, when an unhandled exception is thrown...). If you want to add config data you can make your own XML and add it as a resource, another option is to read settings using a WCF services (in order to store them on the server side).

              /// -------------------------      Braulio Díez      DBSchemaEditor.com      Free Silverlight based DB Schema Modeling Tool /// -------------------------

              D 1 Reply Last reply
              0
              • B Braulio Dez

                Jejejeje, it's normal to have that confusion when you start developing in Silverlight. The most similar thing that you can fin in SL is the app object, there you will have global events and method (when the app starts which page to show, when an unhandled exception is thrown...). If you want to add config data you can make your own XML and add it as a resource, another option is to read settings using a WCF services (in order to store them on the server side).

                /// -------------------------      Braulio Díez      DBSchemaEditor.com      Free Silverlight based DB Schema Modeling Tool /// -------------------------

                D Offline
                D Offline
                devvvy
                wrote on last edited by
                #7

                Thanks mate, I got that one.

                dev

                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