javascript - How to open page in new Tab (NOT WINDOW) in ASP.NET C#? -
i have aspx page needs open in new tab in internet explorer (request firm. they're using ie). problem i've tried open new window, not tab. here i've done:
protected void btnpracgr_click(object sender, eventargs e) { scriptmanager.registerstartupscript(this, this.gettype(), "newpage", string.format("window.open({0});", "'pgpracgr.aspx'"), true); }
one more:
protected void btnpracgr_click(object sender, eventargs e) { scriptmanager.registerstartupscript(this, this.gettype(), "newtab", string.format("window.open({0});", "'pgpracgr.aspx'"), true); }
one more:
<asp:linkbutton id="btnpracgr" runat="server" onclientclick ="document.forms[0].target = '_blank';" onclick="btnpracgr_click">practice group reports</asp:linkbutton>
one more:
protected void page_load(object sender, eventargs e) { btnpracgr.onclientclick = string.format("window.open({0});return false;", "'pgpracgr.aspx'"); }
nothing works me... ways open new window... help, please!
you can't force link open in new tab instead of new window.
there's option in ie's properties force popups open in new tabs instead of new window, it's under "internet options" > "general" > "tabs" > "when popup encountered..."
then tests should work.
Comments
Post a Comment