CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> .NET

 retrieve multi-select selected values

Print topic Send  topic

Author Message
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
View profile  Send private message
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.

View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.