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. Web Development
  3. ASP.NET
  4. Passing variables from one application to other web application

Passing variables from one application to other web application

Scheduled Pinned Locked Moved ASP.NET
questionhelp
8 Posts 4 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.
  • G Offline
    G Offline
    Guru_yogi
    wrote on last edited by
    #1

    HI.. Suppose I have two application A and B. I want to redirect from one page of application A to one page of application B along with some variables. how can I do this?.. plz help me..

    Gurudatta B. Shelke

    I V 2 Replies Last reply
    0
    • G Guru_yogi

      HI.. Suppose I have two application A and B. I want to redirect from one page of application A to one page of application B along with some variables. how can I do this?.. plz help me..

      Gurudatta B. Shelke

      I Offline
      I Offline
      IamMohan
      wrote on last edited by
      #2

      You can pass a value in form a Query string to other application like, You can place the value inside the session from one application to the other application,This solution will be workable only if these two apps share a common session, means same server:) If this two application is in different server then try this, http://ServerName/AliasName/FileName.aspx?name=value, just pass the value as a query string

      Mohan

      G 1 Reply Last reply
      0
      • I IamMohan

        You can pass a value in form a Query string to other application like, You can place the value inside the session from one application to the other application,This solution will be workable only if these two apps share a common session, means same server:) If this two application is in different server then try this, http://ServerName/AliasName/FileName.aspx?name=value, just pass the value as a query string

        Mohan

        G Offline
        G Offline
        Guru_yogi
        wrote on last edited by
        #3

        Thanks for Your guidance but How can i access session variable of one application in other application :(

        Gurudatta B. Shelke

        T 2 Replies Last reply
        0
        • G Guru_yogi

          Thanks for Your guidance but How can i access session variable of one application in other application :(

          Gurudatta B. Shelke

          T Offline
          T Offline
          Tal Even Tov
          wrote on last edited by
          #4

          If you passed the varaible as: http://ServerName/AliasName/FileName.aspx?name=value Then, in C# you could access the variable 'name' as: Request["name"] This returns the string 'value' (always a string!!!)


          The best times in life are the ones you can't remember!!!

          1 Reply Last reply
          0
          • G Guru_yogi

            Thanks for Your guidance but How can i access session variable of one application in other application :(

            Gurudatta B. Shelke

            T Offline
            T Offline
            Tal Even Tov
            wrote on last edited by
            #5

            Sorry, I was referring to accessing the query string varaibles. I don't think there is any way to access session variables across web applications. ASP.NET registers the session variables with the application so each application has it's own variables. I just use query strings cause it's easier.


            The best times in life are the ones you can't remember!!!

            I 1 Reply Last reply
            0
            • G Guru_yogi

              HI.. Suppose I have two application A and B. I want to redirect from one page of application A to one page of application B along with some variables. how can I do this?.. plz help me..

              Gurudatta B. Shelke

              V Offline
              V Offline
              Vasudevan Deepak Kumar
              wrote on last edited by
              #6

              Form Posting should be more safe, secure and reliable.

              Vasudevan Deepak Kumar Personal Homepage Tech Gossips

              1 Reply Last reply
              0
              • T Tal Even Tov

                Sorry, I was referring to accessing the query string varaibles. I don't think there is any way to access session variables across web applications. ASP.NET registers the session variables with the application so each application has it's own variables. I just use query strings cause it's easier.


                The best times in life are the ones you can't remember!!!

                I Offline
                I Offline
                IamMohan
                wrote on last edited by
                #7

                Hi, I have one work around for this, Any have this applications (A & B) are gonna be available on the same server and share the same machin.config file, So what you can do is add a new key and have some default value set for the key and during runtime set the value for that key from Application 'A' and access the same from the Application 'B' ensure there is no default value so that you can get the value set by the Application 'A'

                Mohan

                I 1 Reply Last reply
                0
                • I IamMohan

                  Hi, I have one work around for this, Any have this applications (A & B) are gonna be available on the same server and share the same machin.config file, So what you can do is add a new key and have some default value set for the key and during runtime set the value for that key from Application 'A' and access the same from the Application 'B' ensure there is no default value so that you can get the value set by the Application 'A'

                  Mohan

                  I Offline
                  I Offline
                  IamMohan
                  wrote on last edited by
                  #8

                  The second work around is: 1) Have a common helper class in the Application class that should be a static singleton class and define the attributes according to your requirement(s) in the class 2) Set the value in the respective variable of that class(Singleton) from Application 'A' 3) Add the refernce of the application in Applicatin 'B' and include the namespace and access call the custom method(has to be defined in the Singleton class of app 'A') that inturn returns the required value also it is persist accross applications I'm sure this would be the appropriate solution

                  Mohan

                  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