FormView Insert record containing DropDownList value
-
Hi, I've built a FormView with a number of fields and a corresponding insert template. It works fine and I can insert a record with no problem. However, I now want to replace one of the text fields with a dropdownlist so I can select from a number of fixed options. I've supplied a data source which references a small list of values table: DataSourceID="sdsProducts" DefaultMode="Insert"> Name: Type: DataSourceID="sdlType" DataTextField="Value" DataValueField="ID" /> ConnectionString="<%$ ConnectionStrings:myConnStr %>" SelectCommand="SELECT * FROM [lovType]"> ConnectionString="<%$ ConnectionStrings:myConnStr %>" InsertCommand="INSERT INTO [tblProducts] ([Name], [Type]) VALUES (@Name, @Type)"> I can see the values in the dropdownlist but it doesn't seem to insert any value for the dropdownlist. I'm having no luck with this at all. Is it even possible to place a dropdownlist control in a FormView's InsertItemTemplate? Thanks for looking :)
Evil cannot be conquered in the world... It can only be resisted within oneself.