title: Please check my code to add linkbutton and click event programmatcally in asp.net
body: <p>i wrote following code to create a linkbutton programmatically, but its showing like lable at runtime not as link</p>
  
  <pre><code>Dim lnkbutton As LinkButton = New LinkButton()
  lnkbutton.ID = "HostelsClub" &amp; dr("dshotelid").ToString()
  lnkbutton.Text = "HostelsClub"
  lnkbutton.PostBackUrl = Request.Url.ToString()
  
  lnkbutton.ToolTip = "Click here To Book"
  AddHandler lnkbutton.Click, AddressOf lnkBook_Click
  PHbook.Controls.Add(lnkbutton)
  </code></pre>