要访问记事本,计算器,通过asp.net [英] To Access Notepad, calculator through asp.net

查看:196
本文介绍了要访问记事本,计算器,通过asp.net的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我米试图打开记事本,计算器在背后用C#code asp.net按钮的点击。我试着用code

I m trying to open Notepad, Calculator in button click in asp.net with code behind C#. I tried with the code

 System.Diagnostics.Process.Start("c:\\windows\\system32\\notepad.exe");

这是在本地系统工作正常,但在服务器中不工作。我甚至使用JavaScript试图

this is working fine in local system but not working in the Server. I even tried with the javascript

function executeCommands(inputparms)
{
alert('ff');
var oShell = new ActiveXObject("Shell.Application");
var commandtoRun = "C:\\Winnt\\Notepad.exe";
if (inputparms != "")
{
    var commandParms = document.form1.filename.value;
}

oShell.ShellExecute(commandtoRun, commandParms, "", "open", "1");
}

即使这是行不通的。能否请你建议我在如何打开客户端的记事本应用程序与出令人不安的服务器记事本结束。

even this is not working out. Can you please suggest me in on how to open the notepad application in the client end with out disturbing server notepad.

推荐答案

这不能做。试想一下,我们会在如果一个网页可以运行在客户端计算机上的任意程序的安全一塌糊涂。哦,等一下...; - )

This can't be done. Imagine the security mess we'd be in if a web-page could run arbitrary programs on a client machine. Oh wait... ;-)

这篇关于要访问记事本,计算器,通过asp.net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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