Z
zamdrist
I have an ASPX codebehind webform with two drop down lists. The first
code below gets data and populates the ddl. The second (ddlGroups)
fails and I cannot figure out why. I checked the permissions of the
stored procedure, even ran it via query analyzer.
Although I haven't figured out how to turn debugging on, by process of
elimination I believe it's the line .DataSource=...in the second With,
End With that appears to be failing with a runtime error. The first
works splendidly.
Any thoughts, ideas? Thanks...
Dim adoComm_Attorney As New
SqlCommand("sp_UTL_MGProlawContacts_GetAttorneyCategories", adoConn)
With ddlAttorney
.DataSource = adoComm_Attorney.ExecuteReader()
.DataTextField = "Category"
.DataValueField = "Category"
.DataValueField = "Category"
.DataBind()
End With
Dim adoComm_Groups As New
SqlCommand("sp_UTL_MGProlawContacts_GetGroups", adoConn)
With ddlGroups
.DataSource = adoComm_Groups.ExecuteReader()
.DataTextField = "CategoryGroup"
.DataValueField = "CategoryGroup"
.DataBind()
End With
code below gets data and populates the ddl. The second (ddlGroups)
fails and I cannot figure out why. I checked the permissions of the
stored procedure, even ran it via query analyzer.
Although I haven't figured out how to turn debugging on, by process of
elimination I believe it's the line .DataSource=...in the second With,
End With that appears to be failing with a runtime error. The first
works splendidly.
Any thoughts, ideas? Thanks...
Dim adoComm_Attorney As New
SqlCommand("sp_UTL_MGProlawContacts_GetAttorneyCategories", adoConn)
With ddlAttorney
.DataSource = adoComm_Attorney.ExecuteReader()
.DataTextField = "Category"
.DataValueField = "Category"
.DataValueField = "Category"
.DataBind()
End With
Dim adoComm_Groups As New
SqlCommand("sp_UTL_MGProlawContacts_GetGroups", adoConn)
With ddlGroups
.DataSource = adoComm_Groups.ExecuteReader()
.DataTextField = "CategoryGroup"
.DataValueField = "CategoryGroup"
.DataBind()
End With