• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 271
  • Last Modified:

Passing Value from One Proj to other Proj in ASP.Net

I have one ASP.Net Project in One server and other ASP.Net Proj in other Server. I want to pass a value from Project 1 to Project 2. How can I do it.

Thanks
0
srikanthreddyn143
Asked:
srikanthreddyn143
  • 4
  • 4
  • 2
2 Solutions
 
käµfm³d 👽Commented:
Have you considered adding a web service to the receiving project?
0
 
williamcampbellCommented:
Project1.Asp Sends
     
    Server.Execute("Project2.Asp?MyPassedVarable="Hi!");

Project2.Asp Receives

   in PageLoad()
 
   String theVar =   Request.QueryString["MyPassedVariable"];
   // theVar = "Hi!"


0
 
srikanthreddyn143Author Commented:
Thanks for you replies.

@WilliamCambell,I was told not to use QueryStrings

@Kaufmed,

If I use Web Service at receiving end, I have to Populate the value at First Proj right?

How do I do that?
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
käµfm³d 👽Commented:
If you use web service, then you will have a reference to the receiving end and your first project will just have another function call to use. So in essence, yes, you would have to populate, but you would be populating a function parameter.
0
 
williamcampbellCommented:
You can also

 1) Upload a file with some text in it  - Check to see if the file exists
 2) Send an email - check email for an email from that server
 3) Do a HTTP Post and embed the command in the header
 
 Web services is a bit extreme as it entails a lot of overhead unless you use WCF or MVC.

Depends on how much time you have...but all the suggestion so far will work
0
 
srikanthreddyn143Author Commented:
@kaufmed

Can I have a sample code on how to populate at Proj1 and receive at Proj2.

Thanks.

0
 
käµfm³d 👽Commented:
You'll have to forgive me, but I've never actually done what I suggested :/ I made a project which I believe is what you are looking to do, however, the only thing I could think to do was make the data member static in order to persist it for when the receiver page retrieves it.

I was trying to figure a way to raise an event from within the service, but I could not think how to run the Receiver_Default page once the event fired.

See the following link for the project I tested with

https://filedb.experts-exchange.com/incoming/ee-stuff/7616-Sender.zip
0
 
srikanthreddyn143Author Commented:
Cant we use Cookies?
0
 
käµfm³d 👽Commented:
I would imagine that you could. I wasn't sure what your requirements were, and I think I (hastily) discounted cookies when you mentioned not being able to use QueryString--I do realize the two are unrelated :)
0
 
srikanthreddyn143Author Commented:
Thank you both for your help
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 4
  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now