www.webdeveloper.com
+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2012
    Posts
    9

    Multiple Command Argument (GUID and String)

    Dear All,

    I would like to ask how to bind multiple command argument if one of the argument is a GUID(RoomID) type and the other one is a String(Date).

    This is my asp Gridview:
    <asp:Linkbutton CommandName="Test" CommandArgument='<%# Eval ("RoomID") + "," + Eval("Date") %>' />

    and my rowcommand :

    If e.CommandName = "Test" Then
    Dim commandArgs As String() = e.CommandArgument.ToString().Split(New Char() {","C})

    Dim IDtest as String = commandArgs(0)
    Dim datetest as String = commandArgs(1)
    End If


    I got an error :

    invalid cast exception was unhandled
    Operator '+' is not a right one for GUID ',' and string types.

    I have been looking for the answer but there is no answer for string and GUID types.
    Thanks again for all your help. Any answers would be really appreciated.


    JCO

  2. #2
    Join Date
    Mar 2006
    Location
    Discworld
    Posts
    75
    try this:

    Dim IDtest as String = commandArgs(0).ToString();
    Dim datetest as String = commandArgs(1).ToString();

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Bookmarks

Posting Permissions

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



Recent Articles