ASp.net

Sunday, January 31, 2016

how to open a page in new tab on button click in asp net





Below Code Open only one new Tab and if you click again it refresh that page: 

Protected Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click Page.ClientScript.RegisterStartupScript(Me.GetType, "OpenWindow", "window.open('UnitType.aspx','_newtab');", True) 
End Sub



Below Code Open new Tab and if you click again it will open another new tab page: 

<asp:Button ID="Button7" runat="server" Text="&gt;&gt;" OnClientClick="document.getElementById('form1').target ='_blank';" /> Protected Sub Button7_Click(sender As Object, e As EventArgs) Handles Button7.Click Response.Redirect("Authors.aspx") End Sub

No comments:

Post a Comment

MM Online Express | Best product Review and Online Marketing site

MM Online Express | Best product Review and Online Marketing site