Simple blog detailing code examples for both vb.net, c# and PHP and hints and tips for Crystal Reports.
Friday, 1 April 2011
Selected Values for Multiple ListBox
Simple little one in both vb.net and C# When you have a Multiple Selection Listbox whether it is static or dynamic and you wish to have previous entered data for a view page to be selected it is imperative that you enter the code for each selection as follows: in vb.net lb_cause.Items(1).Selected = True where 1 is the value for the list item in the listbox and c# lb_cause.Items[1].Selected = True; Never, ever use lb_cause.SelectedValue = 1 Thats all for now.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment