473,394 Members | 1,700 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

LIstbox in Web aplication

I've found a trouble with using Listbox cortrol in Web application.
I've used it previously and all works good.
I can get which elements are selection.

for (int nrp = 1; nrp < lbWorker.Items.Count; nrp++)
{
if (lbWorker.Items[nrp].Selected)
{

if(txtEmailAdres.Text.IndexOf(lbWorker.Items[nrp].Value)<0)
txtEmailAdres.Text += lbWorker.Items[nrp].Value
+";";
}
}
In this case the property Selected is set on false for all of the
elements.

Is there any changes in that component in last time.
I use VS 2005.
Apr 1 '08 #1
2 1211
On Apr 1, 7:58*am, Midger <mid...@wp.plwrote:
I've found a trouble with using Listbox cortrol in Web application.
I've used it previously and all works good.
I can get which *elements *are selection.

*for (int nrp = 1; nrp < lbWorker.Items.Count; nrp++)
* * * * * * * * {
* * * * * * * * * * if (lbWorker.Items[nrp].Selected)
* * * * * * * * * * {

if(txtEmailAdres.Text.IndexOf(lbWorker.Items[nrp].Value)<0)
* * * * * * * * * * * * txtEmailAdres.Text += lbWorker.Items[nrp].Value
+";";
* * * * * * * * * * }
* * * * * * * * }
In this case the property Selected is set on false for all of the
elements.

Is there any changes in that component in last time.
I use VS 2005.
Are you sure there are at least one selected?

Hint, if you can select only one item you could also try SelectedItem/
SelectedIndex properties of the ListBox control
Apr 1 '08 #2
I made many tests where I couldn't found the reason of this error. Of
course I wrote the event SelectedIndexChanged for this component. The
event function was fired but,during debugging mode, in the watch
window all the items have false value in Selection property.
I've also tried to create the new one but the result was the same.
Apr 1 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Marek | last post by:
Whe i'm running my .net aplication from share on other server, i've got an error. Can someone explain what i must do? Unhandle exception:System.Security.SecurityException: Permission demand type...
17
by: amber | last post by:
Hello. Can someone tell me what I may be doing wrong here? I'm using the code (lboxRP is a listbox): Dim newRPindex As Integer newRPindex = Me.lboxRP.FindString(RP)...
0
by: Szaki | last post by:
Hello I have a aplication who connect with my databases (sql server 2000). I want to do a loggin to this aplication, becouse I have constatns login in this time. I have: Dim myConnectionString...
6
by: Chris Leuty | last post by:
I am populating a multiselect Listbox from a dataset, with the content of the listbox filled by one table, and the selections determined from another table. So far, I have been keeping the dataset...
7
by: Dave | last post by:
Hi all, After unsuccessfully trying to make my own dual listbox control out of arraylists, I decided to look for a 3rd party control. I've looked for over a week now and can't find anything but...
1
by: savvaschr | last post by:
Hello Is there a command or a way to have a vb.net aplication run in the notification area of the taskbar toolbar? I have a vb.net aplication and i want it after loading to minimize and to...
3
by: Ali Chambers | last post by:
Hi, I have created a listbox called "dtlist1" on my VB.NET form. I call a procedure as follows: Private Sub openfile(flname As String) dtlist1.Items.Clear() etc..
5
by: fanor | last post by:
I have a windows aplication and i would like to send email. Does anyone one know what is the yahoo server??? TIA PD: my aplication is in VS 2005 and c#.
1
by: KF4fun | last post by:
Recently i am being given a windows aplication which was made using VB.net . I was asked to remake the windows aplication but i found it quite hard to do so because i am new to VB.net . The codes...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.