I have an app that allows our staff to submit client referrals. I'm currently working on a management page that allows the resposible staff member to manage the referrals and send them to the correct staff member / department. The page is written in VB and has a sql back end.
I have a detailsview with a number of template fields. The one I am interested in is the Assigned To RadioButtonList. I have configured it so that its text is the staff member's name and its value is thier email address.
In the next row I have a dropdown list that is supposed to display the email address of the selected staff member based on the selected value of the Assigned To Radiobuttonlist.selectedva
I normally just use the datasource wizard and base a where clause on a control, but when I try this when the control is in a template field it is not listed in the available controls.
Does anyone know how to have my control added to the list or know of another way of doing this?
I've also tried the following code with no success:
If ReferralsManagementDV.CurrentMode = DetailsViewMode.Edit Then
Dim ReferralAssignedToRBL As RadioButtonList = DirectCast(ReferralsManagementDV.FindControl("ReferralAssignedToRBL"), RadioButtonList)
Dim ReferralAssignedToEmail As TextBox = DirectCast(ReferralsManagementDV.FindControl("ReferralAssignedToEmailTB"), TextBox)
If (ReferralAssignedToRBL.SelectedValue) IsNot Nothing Then
ReferralAssignedToEmail.Text = ReferralAssignedToRBL.SelectedValue.ToString
SendStatusUpdateButton.Visible = False
CloseTicketButton.Visible = False
I receive the "'ReferralAssignedToRBL' has a SelectedValue which is invalid because it does not exist in the list of items.
Parameter name: value error when I click the edit button.