title: How to get url for linkbutton
body: <p>I have a DataList, which are loaded in the search results(url, description, title). I need to know URL for which the user click on the search results. I do this using linkbutton. But OnClick handler can't call, if I using PostBackUrl property in LinkButton Control. </p>
  
  <pre><code>//Default.aspx
      &lt;asp:Panel ID="panResults" runat="server" Height="236px"&gt;
          &lt;p style="text-align: left" align="left"&gt;&lt;asp:Label runat="server" ID="lblTotal" Font-Bold="true" /&gt;&lt;/p&gt;
          &lt;asp:DataList ID="dlstResults" runat="server" CellPadding="4" 
              ForeColor="#333333" Width="100%" OnItemDataBound="DataList_ItemDataBound" &gt;
              &lt;FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" /&gt;
              &lt;SelectedItemStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" /&gt;
              &lt;AlternatingItemStyle BackColor="White" ForeColor="#284775" /&gt;
              &lt;ItemStyle BackColor="#F7F6F3" ForeColor="#333333" /&gt;
              &lt;HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" /&gt;
              &lt;ItemTemplate&gt;
                  &lt;asp:LinkButton ID="lnkResultUrl" runat="server" OnClick="Link_Click" CommandArgument='&lt;%# Eval("Url") %&gt;'
                      PostBackUrl='&lt;%# Eval("Url") %&gt;' Text='&lt;%# Eval("Title") %&gt;' /&gt;
                  &lt;br /&gt;
                  &lt;asp:Label ID="lblResultUrl" runat="server" Font-Bold="true"
                      Text='&lt;%# Eval("Url") %&gt;' /&gt;
                  &lt;br /&gt;
                  &lt;asp:Label ID="lblResultSummay" runat="server" 
                      Text='&lt;%# Eval("Description") %&gt;' /&gt;
              &lt;/ItemTemplate&gt;     
          &lt;/asp:DataList&gt;   
      &lt;/asp:Panel&gt;
  
  //Code-behind
  protected void Link_Click(object sender, EventArgs e)
  {
      LinkButton btn = (LinkButton)(sender);       
      string myValue = btn.CommandArgument;
  }
  </code></pre>