Trying to update parameters in ASP

jogehewrqt

New Member
I get this error:'DropDownList2' has a SelectedValue which is invalid because it does not exist in the list of items.Parameter name: valueWhat does this mean? I have DropDownList2 bound to the correct value, but I keep getting this error.\[code\] <asp:TemplateField HeaderText="Doctor" SortExpression="Doctor"> <EditItemTemplate> <asp:DropDownList ID="DropDownList2" runat="server" DataSourceID="sdDoctorList" DataTextField="Doctor" DataValueField="ID" SelectedValue='http://stackoverflow.com/questions/15865411/<%# Bind("Doctor") %>'> </asp:DropDownList> </EditItemTemplate> <ItemTemplate> <asp:Label ID="Label6" runat="server" Text='<%# Bind("Doctor") %>'></asp:Label> </ItemTemplate> </asp:TemplateField> <UpdateParameters> <asp:Parameter Name="ID" Type="Int32" /> <asp:Parameter Name="OHIP" Type="String" /> <asp:Parameter Name="FirstName" Type="String" /> <asp:Parameter Name="LastName" Type="String" /> <asp:Parameter DbType="Date" Name="DOB" /> <asp:Parameter Name="VisitsPerYear" Type="Int32" /> <asp:Parameter Name="DoctorID" Type="Int32" /> <asp:Parameter Name="Timestamp" Type="Byte"></asp:Parameter> </UpdateParameters>\[/code\]Any suggestions?
 
Back
Top