如何使用asp.net打开命令提示符 [英] how to open command prompt using asp.net

查看:129
本文介绍了如何使用asp.net打开命令提示符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请尽量帮我..
如何打开和写入命令提示符命令使用ASP.NET3.5,C#.NET ...

Please try to help me.. How to open and write commands in Command Prompt using asp.net3.5,C#.net...

如果我在界面点击一个按钮就应该打开commaond提示,我想EXCUTE几个命令有...

if i click a Button in my UI it should open the commaond Prompt and i want excute few commands there...

感谢您..

推荐答案

尝试c您需要添加命名空间来使用这个$ C $

Try to use this code you need to add the namespace

using System.Diagnostics;

 var processStartInfo = new ProcessStartInfo
                                   {
                                       Arguments = "ping google.com",
                                       FileName = "cmd"
                                   };

        Process process = Process.Start(processStartInfo);

这篇关于如何使用asp.net打开命令提示符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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