使用asp.net在不同的浏览器中以编程方式打开网页

问题描述:

嗨..............
我想使用asp.net在不同的浏览器中以编程方式打开我的网页,即在mozila中打开的网页,chrome取决于用户输入.我想在asp.net.com中为此功能提供解决方案.

提前感谢

hi..............
I want open my web page programmatically in different browsers using asp.net i.e web pages open in mozila,chrome depends on user input.I want to this functionality in asp.net.provide soln for it.

Thanx in advance

System.Diagnostics.Process proc = new System.Diagnostics.Process();
如果(您的Firefox条件)
{
proc.StartInfo.FileName ="firefox";
}
否则if(ie的条件)
{
proc.StartInfo.FileName ="iexplore";
}
否则,如果(您的镀铬条件)
{
proc.StartInfo.FileName ="chrome";
}

等等.....

proc.StartInfo.Arguments ="www.google.com";
proc.Start();
System.Diagnostics.Process proc = new System.Diagnostics.Process();
If(ur condition for firefox)
{
proc.StartInfo.FileName = "firefox";
}
else if(ur condition for ie)
{
proc.StartInfo.FileName = "iexplore";
}
else if(ur condition for chrome)
{
proc.StartInfo.FileName = "chrome";
}

and so on.....

proc.StartInfo.Arguments = "www.google.com";
proc.Start();


只需右键单击Visual Studio上的页面,选择浏览方式,然后选择所需的浏览器.
Just right click on the page on Visual Studio, choose browse with and then select the browser of your choice.


你好我亲爱的朋友!

转到解决方案资源管理器,(Ctrl + Alt + S)

右键单击您的项目名称->点击浏览->从列表中选择浏览器->设置为默认值.

如果需要,可以从列表中设置浏览器窗口的大小.


谢谢.
Hello My Dear Friend !!

Go to Solution Explorer,(Ctrl+Alt+S)

Right Click on Your Project name -> Click on Browse with -> select the browser from list -> Set as Default.

if you want, you can set the size of the browser window from list.


Thanks.