3

Is it possible to use asp:LinkButton without JavaScript to open new windows? Currently i have workable next 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>
Juri Bogdanov
  • 295
  • 1
  • 11
  • 19
  • I use UpdatePanel and after a new window is opened from the parent window - JS error appearing like : "Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled." – Juri Bogdanov Jul 20 '09 at 17:07

1 Answers1

13

As i know linkbuttons were originally designed to do a postback to the same page

If i were you i would use a hyperlink control instead

Issa Qandil
  • 1,228
  • 10
  • 17