Bil Simser
|
Posted: 01/05/2004, 7:33 PM |
|
Hi guys,
I'm wondering if I can do this. I have a listbox in ASP that's tied to a
datasource to get the list of values. The problem is that I also want to
prepend a value that's not in the database to the list. The list is data
driven and the db has an identity field so all IDs start at 1. I want to add
a manual value of 0 with "root" as the text to the listbox. I can't see how
to do this in something like the Before Show event of the form or listbox.
Any ideas? Thanks.
-Bil
|
|
|
Edd
Posts: 547
|
Posted: 01/05/2004, 9:41 PM |
|
Bil,
I might be looking at this simplistically but if you right click on the listbox in design mode and go to the <SELECT> option you can change the Select Value default from nothing to 0 by clicking on it.
Alternatively if you want to change the values of the listbox the Help has an example i.e.
BeforeShow event of the listbox:to set a default -
Function Registration_MonthBox_BeforeShow()
If IsEmpty(Request.QueryString("MonthBox")) then
Registration.MonthBox.Value = Month(NOW())
End if
End Function
_________________
Accepting and instigating change are life's challenges.
http://www.syntech.com.au |
|
|
|