Results 1 to 2 of 2

Thread: Multiple CommandArguments in a DataList

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2003
    Posts
    90

    Multiple CommandArguments in a DataList

    Is this possible?

    I have a DataList control that has its OnItemCommend set to an Event Handler in the code behind. This works great. But what I now need to do, is when the user clicks on a Link Button I need to send two CommandArguments. Is there a way to do this?

    <asp:LinkButton
    id=Linkbutton3
    runat="server"
    CommandArgument='<%# DataBinder.Eval(Container.DataItem, "ModelNumber") %>'
    CommandName="AddQuantity"
    Text="Add">
    </asp:LinkButton>

    The code above works fine, but I now need to also send to the event handler the quantity value that is also in the Datasource.

    Thanks!

  2. #2
    Hyperactive Member
    Join Date
    Aug 2002
    Location
    Fort Collins, CO
    Posts
    366
    I usually use a value separated list, like separate the two args you want to pass in by comma or whatever character, then split arg value in the eventhandler.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width