title: How to pass the SelectedValue from a DropDownList as a query string in a LinkButton with/without using CodeBehind in ASP.net C#
body: <p>I've been fiddling with this issue for quite sometime now where I am not able to pass the value of a DropDownList to a Link Button. The Eval doesn't seem to work at all.
  Here's the code:</p>
  
  <pre><code>&lt;asp:LinkButton ID="LinkButton1" runat="server" PostBackUrl='&lt;%# string.Format(~/DataView.aspx?id=) + Eval(DropDownList1.SelectedValue) %&gt;' Text="New ECRS"&gt;&lt;/asp:LinkButton&gt;
  </code></pre>
  
  <p>When I run the above code, the link button doesn't function and there's no page redirection. But I see in many forums that people have given the above code as the answer. Am I doing something wrong? Thanks in advance :)</p>