drop down list
Hi
I have a drop down list which gets populated from database but I want to add the default value as
--Select-
Hi
I have a drop down list which gets populated from database but I want to add the default value as
--Select-
Here's a trick you can use. Use a Union query to append your default to your database results, like so:
SELECT
SELECT
Hi Frank
I tried it but I think I am not putting the qoutes properly.
SqlCommand("select '"&--Choose One--&"'"
as typeName union select typeName from attributeType")Your string should look like this:
"select '--Choose One--' as typeName union select typeName from attributeType"
Remember to check for the default value before saving your information. You don't want to save "Choose One" to your database.
Thanks Frank!!!
I tried t his also, creating a view on the table and than selecting the data from view.It works fine but I don't think its a good method.