如何在Web表单单击事件上调用窗口表单 [英] how to call window form on web form click event

查看:98
本文介绍了如何在Web表单单击事件上调用窗口表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

网站,我有一个网络表单和一个
在Web表单上单击按钮,然后如何在Web站点和Web站点上添加窗口表单
Web表单单击事件,我想打开窗口表单...
我有一个网站链接,在此窗口窗体已在Web窗体上打开
点击事件..
我想这样做..
https://careeropportunity.polaris.co.in/portal/LoginPage.aspx?obj=0qKjcPeCekWJwsxZ5QavzrwX2%2ftaP9PS#dlgRegister

如何在Web表单按钮上打开窗口表单单击事件

website,i have a web form and a
button on web form ,then how to add a window form in web site and on
web form click event i want to open window form .....
i have a link of a web site in this a window form is open on web form
click event ..
i want to do same like this..
https://careeropportunity.polaris.co.in/portal/LoginPage.aspx?obj=0qKjcPeCekWJwsxZ5QavzrwX2%2ftaP9PS#dlgRegister

how to open window form on web form button click event

推荐答案

您无法从asp.net应用程序中打开窗口表单,但是可以执行Windows应用程序.

You can not OPEN a window form from asp.net application, but yes you can execute an windows application.

using System.Diagnostics;

Process.Start("example.exe");



此代码将在服务器上执行,并且如果希望exe在服务器上并且仅在服务器上运行,则该代码.

如果您希望在这种情况下在客户端计算机上执行一些代码,则可以在Javascript中使用ActiveX对象.



this code will execute on server and it iff expect that the exe is at server and will run on server only.

If you wish to execute some code on clients machine in that case you can use ActiveX Objects in Javascript.

function runWinZip() {
var shell = new ActiveXObject("WScript.shell");
shell.run("winzip.exe");
}

<input type="button" name="button1" value="Run Winzip" onClick="runWinZip()" />



确保您的exe路径正确无误.



Make sure your path of exe is correct every where.


请注意,无法在asp/html呈现的页面中打开任何形式的Windows窗体.

您只能给出命令来运行将在服务器上运行的服务器端程序,并且需要RD来查看该进程是否成功启动.

您可以在客户端应用程序启动时执行的另一种方法,该方法将在客户端计算机而不是浏览器中运行.

并且您引用的站点不在asp.net页内运行任何形式的Windows窗体.其纯aspx书面页面.
DEar its not possible to open any sort of windows form inside your asp/html rendered page.

you can only give command to run server side program which will run on server and you need to RD to see if the process started successfully.
or
another way you can do at client side application start which will run at client machine not in browser.

and the site referenced by you is not running any kind of windows form inside the asp.net page. its purely aspx written pages.


这篇关于如何在Web表单单击事件上调用窗口表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆