C # LinkButton.PostBackUrl - New window without JS

Can I use it asp:LinkButtonwithout JavaScript to open new windows? I currently have a workable following code, but with JS.

<asp:LinkButton ID="lnkPcName" runat="server" OnClientClick="window.document.forms[0].target='_blank';" PostBackUrl='<%# Eval("ComputerId", "ComputerInfo.aspx?ComputerId={0}") %>'><%# Eval("pcName") %></asp:LinkButton>
+3
source share
1 answer

As I know linkbuttons were originally designed to post back to the same page

If I were you, I would use a hyperlink instead

+13
source

Source: https://habr.com/ru/post/1713072/


All Articles