Wrox Programmer Forums
|
C# 2005 For discussion of Visual C# 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 18th, 2008, 03:52 AM
Authorized User
 
Join Date: Oct 2007
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default Pass Variables

Hi,

I want to pass 2 variables in ApplicationA to another application - ApplicationB

My code in ApplicationA...
Code:
System.Diagnostics.Process.Start("http://applications/App2/App2.application" + UserName + Period);
And ApplicationB to receive the variables...

Code:
String[] arguments = Environment.GetCommandLineArgs();

label5.Text = "GetCommandLineArgs: {0}" + String.Join(", ", arguments);
However, the variables are not received by ApplicationB.

Why is this?

Thanks.

 
Old July 18th, 2008, 03:58 AM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

I believe that for click-once style applications arguments are passes much like URL query parameters.

The following two articles detail the process of supplying, and then reading of the arguments.

http://msdn.microsoft.com/en-us/library/76e4d2xw.aspx
http://msdn.microsoft.com/en-us/library/ms172242.aspx





/- Sam Judson : Wrox Technical Editor -/





Similar Threads
Thread Thread Starter Forum Replies Last Post
Pass session variables from one website to another cdanczak BOOK: Beginning ASP 3.0 2 November 27th, 2007 11:13 AM
How do I Pass Session Variables cdanczak Classic ASP Professional 0 November 27th, 2007 10:42 AM
how can I pass variables to vb? astarti Beginning VB 6 4 September 5th, 2007 08:43 AM
Is it better to pass variables to a function? stephen_c_ Beginning PHP 3 November 4th, 2005 05:07 AM
How Do I Pass 2 Variables in Javascript Lucy Javascript 2 December 13th, 2003 11:25 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.