0

I have an web page and a desktop app(C#). On a click in link in Web pages opens the c# application.

We need to send data from Web page to C# application, C# code should receive it.

<script type="text/javascript" language="javascript">
  <i>  function RunFile() {
    WshShell = new ActiveXObject("WScript.Shell");
    WshShell.Run("C:\hehe\ccslabsLogIn, 1, true");
    }</i>
</script>
<input type="button" value="Run Notepad" onclick="RunFile();"/>

Thanks for Help.

DonBoitnott
  • 10,787
  • 6
  • 49
  • 68
Kishore V
  • 67
  • 6
  • Hey, welcome to SO! Show us the code you've written so far. No one is going to write the code for you from scratch. This is a troubleshooting site, not free coding! – Mrchief Oct 06 '14 at 19:09

1 Answers1

0
WshShell.Run("C:\hehe\ccslabsLogIn <myString>, 1, true");

just replace <myString> with the argument you want to pass.

as for handling the argument: How do I pass command-line arguments to a WinForms application?

and for WPF: WPF Command Line Arguments, a smart way?

Community
  • 1
  • 1
Slime recipe
  • 2,223
  • 3
  • 32
  • 49