Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET C#4.0
plz repond to my query.......!!!
 
How to upload windows form in web project..??????
Posted 18-Feb-13 20:59pm
Comments
abhijeetgupta1988 at 19-Feb-13 3:38am
   
can you be more specific,what do want to do?

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

I guess you want to lunch executable file from web application if so then you can check the following server side code
protected  void OnOpenWIndowsFormClicked(object sedner, EventArgs e)
{
     //exec file location
     string exeFileFullName = @"D:\WindowsFormsApp\bin\WindowsFormsApp.exe";
     Process.Start(exeFileFullName);
}
 
if you run it from client side javascript then only you can do it from internet explorer.
javascript function are as follows
function LaunchApp() {
if (!document.all) {
  alert ("Available only with Internet Explorer.");
  return;
}
var exeFileLocation = "C:\\Windows\\notepad.exe";
var ws = new ActiveXObject("WScript.Shell");
ws.Exec(exeFileLocation);
}
 
It might be cause security whole. So browser settings need to change if you allow to lunch exe applications.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web01 | 2.8.140827.1 | Last Updated 19 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100