I have the following SQL statement for a datalist
Dim selectCMD As SqlCommand = New SqlCommand("Select lastName, lastName + ',' + firstName As firstAndlast, phonenumber, location from phonelist where location = '4th Floor' Order by firstAndlast", dbconn)
Which I try too show in my datalist like this. <%# Container.DataItem( "firstAndlast" ) %> but I am getting the following error
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IndexOutOfRangeException: firstAndlast
How can I fix this?
Dim selectCMD As SqlCommand = New SqlCommand("Select lastName, lastName + ',' + firstName As firstAndlast, phonenumber, location from phonelist where location = '4th Floor' Order by firstAndlast", dbconn)
Which I try too show in my datalist like this. <%# Container.DataItem( "firstAndlast" ) %> but I am getting the following error
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IndexOutOfRangeException: firstAndlast
How can I fix this?