i don't know how to work with command argument in asp.net

Posted by Depozitul de Chestii on Stack Overflow See other posts from Stack Overflow or by Depozitul de Chestii
Published on 2011-01-01T19:33:45Z Indexed on 2011/01/01 19:54 UTC
Read the original article Hit count: 201

Filed under:
|
|

hey,

i'm tryng to pass a parameter with command argument with a link button but the result i get is always "".

this is in my aspx page:

<%
LinkButton1.CommandArgument = "abcdef";                                 
%>
<asp:LinkButton ID="LinkButton1" runat="server" OnCommand= "LinkButton1_Click">

and in my aspx.cs i have:

protected void LinkButton1_Click(object sender,CommandEventArgs ee)
{
    String id = ee.CommandName.ToString();
}

the id is always "" after i press the linkbutton.

would appreciate if someone could help me. thanks

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET