开发者

How to open new web page in a tab In IE 8 in C#

Hi Experts How I can open s开发者_如何学Ceveral URL in tabs in IE 8 using c#? thanks


There is no guaranteed way to control that a new window that you open will be opened up specifically as a new tab. This is because most browsers have this control as a user defined setting.

As far as i can remember, when using window.open in javascript, the best you can do is use target = '_blank' to specify that the target will always be opened in a new window. However, whether this new window is in fact just a new tab or an actual new window is controlled by the users browser setting in tabbed browsers


Make sure you get your hands on the IWebBrowser2 interface of the webbrowser object, then use the Navigate method. Passing navOpenInNewTab in the flags will open the navigated URL in a separate tab.

Pitfalls: do not mix with other flags, do not mix with headers and/or postdata.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜