简体   繁体   中英

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

Hi Experts How I can open several 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM