从c#打开Web浏览器 [英] Opening a web browser from c#

查看:286
本文介绍了从c#打开Web浏览器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HI,


我使用以下代码打开,  


我的内部有一个特定的逻辑控制台应用程序从我的控制台应用程序打开Web浏览器,下面是我用c#编码在浏览器中打开的方式。 


Process.Start(new ProcessStartInfo(" chrome) .exe"," \"" + $ @" http:// testwebsite1 /"));


但这将始终在新的浏览器标签页中打开,我想要的是没有打开新标签只需使用现有标签? 


我们该怎么做? 


谢谢 




解决方案

 System.Diagnostics .Process.Start("  http:// testwebsite1 / "); 




 


HI ,

I am using a below code to open ,  

I have a specific logic within my console application to open a web browser from my console application , and below is the way I coded in c# to open in a browser. 

Process.Start(new ProcessStartInfo("chrome.exe", "\"" + $@"http://testwebsite1/"));

But this will always opening in a new browser tab,what I wanted is without opening a new tab just use the existing tab ? 

how do we do this ? 

thanks 


解决方案

System.Diagnostics.Process.Start("http://testwebsite1/");




这篇关于从c#打开Web浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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