response.redirect in in new tab

Here we will discuss how we can redirect to a new tab in By default when you use Response.Redirect(“Page URL”) it will open in the same tab. But my requirement was to open in new tab instead of the same page.

Also you can read:
 If Else statements in JavaScript Example

SharePoint deveopment training course

– Tutorial on MVVM with WPF

– Working with Content Type Hub in SharePoint 2013

By default the button code will be like this:
<asp:Button ID=”btnSearch” OnClick=”btnSearch_Click” Text=”Click Here” runat=”server” />

And the button click code will be simple:


To open in new tab add the below tag in the button control in .aspx page

OnClientClick=”document.forms[0].target = ‘_blank’;”

The button code should look like below:

<asp:Button ID=”btnSearch” OnClick=”btnSearch_Click” Text=”Click Here”
runat=”server” OnClientClick=”document.forms[0].target = ‘_blank’;” /></div>

Hope this will be helpful

Check out Best Alternative to InfoPath -> Try Now

free sharepoint training

SharePoint Online FREE Training

JOIN a FREE SharePoint Video Course (3 Part Video Series)


About Bijay Kumar

I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site

View all posts by Bijay Kumar →