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> <aspropDownList ID="DropDownList2" runat="server" DataSourceID="sdDoctorList" DataTextField="Doctor" DataValueField="ID" SelectedValue='http://stackoverflow.com/questions/15865411/<%# Bind("Doctor") %>'> </aspropDownList> </EditItemTemplate> <ItemTemplate> <asp:Label ID="Label6" runat="server" Text='<%# Bind("Doctor") %>'></asp:Label> </ItemTemplate> </asp:TemplateField> <UpdateParameters> <asparameter Name="ID" Type="Int32" /> <asparameter Name="OHIP" Type="String" /> <asparameter Name="FirstName" Type="String" /> <asparameter Name="LastName" Type="String" /> <asparameter DbType="Date" Name="DOB" /> <asparameter Name="VisitsPerYear" Type="Int32" /> <asparameter Name="DoctorID" Type="Int32" /> <asparameter Name="Timestamp" Type="Byte"></asparameter> </UpdateParameters>\[/code\]Any suggestions?