rbaldwin
Posts: 172
|
Posted: 11/17/2006, 6:01 AM |
|
i have a text field in my database named "floors" that is a comma separated list as in 5,6,7 or 4,9
on my record form named networks i have a hidden field "floors"
and i have a listbox named the theFloor which is a multi-select control having values from 1 to 68
i have figured out in the before show event how to populate my listbox from the comma delimited text value of the field floors
dim thefloorI
dim listOfFloors = networksFloor.value.split(",")
dim myi,myj
For myi = 0 to networkstheFloor.Items.Count - 1
for myj = 0 to listOfFloors.GetUpperBound(0)
if listOfFloors(myj) = networkstheFloor.Items(myi).text then
networkstheFloor.Items(myi).Selected = true
end if
next
next
what i can't figure out is how to get the list of selected items back out and into my text field in the onValidate or before updat/insert event for the control
all i want is a comma separated list which i'll store in the text field.
I know how to do this with javascript but i want to to it with vb.net
in OnValidate
a = System.Web.HttpContext.Current.Request("networkstheFloor")
gives me the list of possible values, but not the selected values.
a = theFloor.value
gives me only the first selected value
|
|
|
rbaldwin
Posts: 172
|
Posted: 11/17/2006, 6:06 AM |
|
nevermind - solved it myself
a = System.Web.HttpContext.Current.Request("networkstheFloor")
returns the selected values.
|
|
|
|