CommandArgument='<%Select More than one value%>'

M

Mehdi

Hi,

I have a datagrid which is populated by a dataset. I have a column
containing LinkButton that passes MyID and fires my event handler...

....
<ItemTemplate>
<asp:LinkButton id="btnEdit" CommandName="GoToEditPage"
CommandArgument='<%# DataBinder.Eval(Container.DataItem, "MyId")%>'
runat="server" Text="Edit"/>
</ItemTemplate>
....

My problem is that I need to assign another value to CommandArgument
(MySecondID, which exists in the dataset). How can I achieve this?



I have some ideas, such as :

CommandArgument='<%# DataBinder.Eval(Container.DataItem, "MyId") + ";" +
DataBinder.Eval(Container.DataItem, "MySecondId")%>'

and seperate the values by a function

or set another invisible column in my datagrid and get the value of the cell
which will contain MySecondID.


But I thought it might be a better way.

Any ideas?



Kind Regards


Mehdi
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top