title: Linkbutton href url
body: <p>I have a loop in my code with dynamic linkbuttons and I want to set the OnClientClick property to open up the link in a new browser window. It sounds simple but I am having a bit of trouble getting it to work.</p>
  
  <pre><code>lbUrl = new LinkButton();
  lbUrl.Text = r["Url"].ToString();
  
  // r["Url"] is Datarow
  lbUrl.OnClientClick = "location.href=" + r["Url"].ToString();
  </code></pre>
  
  <p>Any ideas?</p>