0
I wonder if there is any way I can open a new tab by right-clicking, or middle-clicking...
I’m using the "LinkButton
" but the command occurs within a OnItemCommand="ListaMenu_ItemCommand
".
Aspx :
<asp:Repeater ID="ListaMenu" runat="server"
OnItemCommand="ListaMenu_ItemCommand">
<ItemTemplate>
<li><asp:LinkButton ID="LknMenu" runat="server" Text='<%#Eval("NOMTIPPRO").ToString()%>' ToolTip ='<%#Eval("CODTIPPRO").ToString()%>' target="_blank">
</asp:LinkButton>
</li>
</ItemTemplate>
</asp:Repeater>
Aspx.Cs :
protected void ListaMenu_ItemCommand(object source, RepeaterCommandEventArgs e)
{
LinkButton lnkId = (LinkButton)e.Item.FindControl("LknMenu");
Response.Redirect("~/KnPesquisa.aspx?knMnuTipo=Tipo&knMnuCodTipo=" + lnkId.ToolTip);
}
When you use the middle button, automatically opens a new correct tab? Could explain better what you need?
– mcamara
What is happening is that I use Response.Redirect() to open pages, but it would redirect the current answer in the current browser tab, even by clicking the middle or right button. The way is to include the " href " in the " Linkbutton tag ".
– Paulo
You can use the Onclientclick event or Asp control:Hyperlink Onclientclick="window.open('Otherpage.aspx', 'Pagename');"
– mcamara
People who code for the middle mouse button are enemies of those who use a laptop touchpad.
– Oralista de Sistemas