I am trying to pass a querystring value via the commandargument of a linkbutton. It doesn't seem to be getting the value and just passing the actual text in the commandargument.
page:
<asp:LinkButton ID="LinkButton1"
runat="server"
CausesValidation="False"
CommandArgument='<%=Request.QueryString("uid")%>'
CommandName="uid"
OnCommand="LinkButton1_Command" >Close Case</asp:LinkButton>
<asp:Button ID="Button2" runat="server" Text="Button" CausesValidation="False" />
code behind:
Protected Sub LinkButton1_Command(ByVal sender As Object, ByVal e As CommandEventArgs)
Label1.Text = "You chose: " & e.CommandName & " Item " & e.CommandArgument
End Sub
It then actually returns:
You chose: uid Item <%=Request.QueryString("uid")%>
when it should return something like:
You chose: uid Item 12345
Thanks J.