I have a stored procedure that accepts a parameter ("UserID") via a session variable, and returns specific data. The data in question comprises of multiple columns containing branch number, and address. I have tested this query, and it performs correctly, returning the necessary data. However, when testing the page (and combo box), the combo box does not list the data, but rather has an item in it that says "System.Data.DataRowView" - and nothing else. This has me a little lost, as I am not certain why it is doing this. Here's the requisite code:
'This is the code behind code for the page_load event; |
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load |
Dim conn As New SqlClient.SqlConnection |
Dim cmd As New SqlClient.SqlCommand |
MemUser = Membership.GetUser() |
UserID = MemUser.UserName.ToString() |
Session("UserID") = UserID & "@tscgrpsolutions.com" |
End Sub |
<!-- Here's the combo box & datasource--> |
<telerik:RadComboBox ID="ddlSelectStore" runat="server" Skin="Black" Width="300px" |
DataSourceID="sqlStoreSelect"> |
</telerik:RadComboBox> |
<!-- Data Connections--> |
<asp:SqlDataSource ID="SqlDataSource1" runat="server" |
ConnectionString="<%$ ConnectionStrings:xxxxxxxxxx%>" |
SelectCommand="StoreSelectCommand" SelectCommandType="StoredProcedure"> |
<SelectParameters> |
<asp:SessionParameter DefaultValue="xxxxxxxxxxxxxx" |
Name="RepName" SessionField="UserID" Type="String" /> |
</SelectParameters> |
</asp:SqlDataSource> |
The data returned comprises of 4 or 5 columns.
Update: I did try doing a SQL select command directly to the database from the ASP.NET data source, and was able to populate the combo box. HOWEVER, the first item in the combo box still says "System.Data.DataRowView", and I cannot select any of the items the combo box is populated with. I have no idea why...
Any direction would be appreciated.