I'm new to ASP.NET, and I had a problem getting a list to return the correct data when sending to another page. I have dropdownlists and switches to work. For example, for dropdownlists I just did this:
Public ReadOnly Property SiteID() As String
Get
Return ddlSites.SelectedValue
End Get
Then on the next page, I successfully returned the value using the PreviousPage.SiteID method. However, when I try to do this for a list:
Public ReadOnly Property CustID() As String
Get
Return lstLoggedInCustomers.SelectedValue.ToString
End Get
End Property
then call it using PreviousPage, I get an empty string, since SelectedIndex always returns -1, although I select an item in the list.
source
share