When I pass multiple arguments via
<asp:Button runat="server" ID="btnUpdate" Text="Update"
CssClass="btn btn-sm btn-success"
CommandName="UpdateCoordinator"
CommandArgument='<%# Bind("iUserID") & "," & Bind("siteID")%>'
CausesValidation="false" />
And in code behind I attempt to split the CommandArgument
like this:
Dim commandArgs As String() = e.CommandArgument.ToString().Split(New Char() {","})
Dim iUserID As Integer = Val(commandArgs(0))
Dim iSiteID As Integer = Val(commandArgs(1))
I am only getting the first argument and the error
System.IndexOutOfRangeException: 'Index was outside the bounds of the array.'
Any assistance to point out what I am missing would be fantastic!