[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2009-04-28
10
Medium Priority
?
265 Views
Last Modified: 2012-05-06
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
Comment
Question by:srikanthreddyn143
  • 4
  • 4
  • 2
10 Comments
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 24255989
Have you considered adding a web service to the receiving project?
0
 
LVL 12

Expert Comment

by:williamcampbell
ID: 24256059
Project1.Asp Sends
     
    Server.Execute("Project2.Asp?MyPassedVarable="Hi!");

Project2.Asp Receives

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


0
 
LVL 11

Author Comment

by:srikanthreddyn143
ID: 24256119
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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 24256158
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
 
LVL 12

Assisted Solution

by:williamcampbell
williamcampbell earned 400 total points
ID: 24256250
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
 
LVL 11

Author Comment

by:srikanthreddyn143
ID: 24259999
@kaufmed

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

Thanks.

0
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 1600 total points
ID: 24261200
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
 
LVL 11

Author Comment

by:srikanthreddyn143
ID: 24261262
Cant we use Cookies?
0
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 24261359
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
 
LVL 11

Author Closing Comment

by:srikanthreddyn143
ID: 31575694
Thank you both for your help
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Suggested Courses

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question