These are ALL great answers if you want to work so hard. But I assume that you already have the items you want for the list coming from the database data item, and only want to add “Hello, man!” To the top of this list. option. Suppose this is so ...
Here is an EASY RESPONSE. And he ALWAYS works ...
- Make your data list exactly as you planned.
- Then, in Visual Studio, edit the items in the drop-down menu,
- Add ONE LEADER, select " Select an item ",
- Using the properties window for an item in VS2012, check it as selected. Now close this window.
- Now go to the properties window in Visual Studio in the lower left hand (make sure the drop-down menu is selected) and find the "AppendDataBoundItems" property.
- It will read False, set this to True.
You will now receive Drop Down with all your data items in it, SUGGESTED in the “Select Product” statement made in a manual item. If possible, try to give it a default value, this will fix any errors that you may encounter. The default value is Zero, so if zero is not a problem, leave it alone; if zero is not a problem, replace the default null parameter with something that will NOT cause your code to crash.
And stop working so hard ... what Visual Studio is for.
source share