从用VB编写的Visual Studio .Net应用程序中打开新的浏览器 [英] Open a new browser from a visual studio .Net application written in vb

查看:79
本文介绍了从用VB编写的Visual Studio .Net应用程序中打开新的浏览器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

单击按钮后,我试图打开一个带有我建立的链接的新浏览器.我试过使用

I am trying to open a new browser with a link that I build once the button is clicked. I have tried using

System.Diagnostics.Process.Start("IExplore.exe", url)

在服务器上运行时在我的本地PC上无法正常工作.有没有办法可以做到这一点?谢谢...

which works fine on my local PC does nothing when running on the server. Is there a way this can be done? Thanks...

推荐答案

尝试:
Response.Write("<script>window.open('" + url + "')</script>")


已阅读此线程,它表明您应该使用window.open

Window.open线程和示例 [
Have a read of this thread it shows that you should use window.open

Window.open thread and example[^]


我发现了问题.因为我使用的是Ajax更新面板,所以必须添加以下内容..
I found the problem. Because I am using and Ajax Update Panel, I had to add the following..
<Triggers>
     <asp:PostBackTrigger ControlID="btnIssuPO" />
     <asp:PostBackTrigger ControlID="btnOSL" />
 </Triggers>



感谢所有的帮助.



Thanks to all that helped.


这篇关于从用VB编写的Visual Studio .Net应用程序中打开新的浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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