Passing variables from one application to other web application
-
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
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
-
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
-
Thanks for Your guidance but How can i access session variable of one application in other application :(
Gurudatta B. Shelke
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!!!
-
Thanks for Your guidance but How can i access session variable of one application in other application :(
Gurudatta B. Shelke
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!!!
-
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
Form Posting should be more safe, secure and reliable.
Vasudevan Deepak Kumar Personal Homepage Tech Gossips
-
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!!!
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
-
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
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