1
I have a hyperlink to view my attachment. My attachment is on the server and your path is saved in the database. I’m wanting at the time that the person click on Hyerlink open a new tab and present the attachment.
Follows my code
function popuplista(c) {
popupwide("'"+ c +"'");
}
<asp:HyperLink ID="lblMensagemAnexo" runat="server" NavigateUrl='<%# Eval("Anexo") %>'
Text="Clique aqui para ver o anexo" Width="250px" Visible="false" Target="_blank"></asp:HyperLink>
lblMensagemAnexo.NavigateUrl = "javascript:popuplista('" + dt.Rows[0]["Anexo"].ToString() + "');";
I put wrong thing, exchange Navigateurl for Commandargument.
– Diego Zanardo
It works, but will not open in a new tab. Because target does not work in hyperlink.
– Diego Zanardo
Sorry @Marconi, I got confused. I thought it was Linkbutton, then I would have to use this procedure. For a Hyperlink, just use Target.
– Diego Zanardo