How to open html page in new browser tab in asp.net link button click event in c#

Posted by Sekar.C under ASP.NET on 3/6/2013 | Points: 10 | Views : 5068 | Status : [Member] | Replies : 1
Hi,
How to open html page in new browser tab in asp.net link button click event in c#.

Regards
Sekar.c



Responses

Posted by: Jayakumars on: 3/7/2013 [Member] [MVP] Bronze | Points: 25

Up
0
Down
hi

try this code


<asp:LinkButton ID="link1" runat ="server" Text ="Click" OnClientClick ="Newop();"
onclick="link1_Click" ></asp:LinkButton>

<script>
function Newop() {
var open_link = window.open('', '_blank');
open_link.location = "somepage.htm";
}

</script>

Mark as Answer if its helpful to you

Kumaraspcode2009@gmail.com

Sekar.C, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response