注:如何在Web项目中上传Windows窗体 [英] Reg:how to upload windows form in web project
本文介绍了注:如何在Web项目中上传Windows窗体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
请回复我的查询....... !!!
如何在网页项目中上传Windows窗体.. ??????
plz repond to my query.......!!!
How to upload windows form in web project..??????
推荐答案
我想你想从网络应用程序中午餐可执行文件,如果有,那么你可以查看以下服务器端代码
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);
}
如果您从客户端javascript运行它,那么只有您可以从Internet Explorer执行此操作。
javascript函数如下
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);
}
这可能会导致整个安全问题。因此,如果允许午餐exe应用程序,则需要更改浏览器设置。
It might be cause security whole. So browser settings need to change if you allow to lunch exe applications.
这篇关于注:如何在Web项目中上传Windows窗体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文