Open Url in Same Window and in Same Tab

How to open URL in same window and in same tab

This works for me:

<asp:LinkButton ID="lbiOpen" runat="server">Example</asp:LinkButton>


protected void Page_Load(object sender, EventArgs e)
{
lbiOpen.Attributes.Add("onclick", "window.open('New.aspx', 'New Window', 'width=200,height=100')");
}

Open a url in new and same tab again and again

You need to pass a name as the second parameter to window.open

As long as the tab with that name has not been closed, it will be reused.

Opening a link in the same tab with html