473,800 Members | 2,304 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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(txtEmailAdre s.Text.IndexOf( lbWorker.Items[nrp].Value)<0)
txtEmailAdres.T ext += 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 1219
On Apr 1, 7:58*am, Midger <mid...@wp.plwr ote:
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(txtEmailAdre s.Text.IndexOf( lbWorker.Items[nrp].Value)<0)
* * * * * * * * * * * * txtEmailAdres.T ext += 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 SelectedIndexCh anged 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
388
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 System.Security.Permissions.EnvironmentPermission, mscorlib, Version=1.0.5000. 0, Culture=neutral, PublicKeyToken=b77a5c561934e089 not succed. at System.Security.CodeAccessSecurityEngine.CheckHelper(PermissionSet granted Set, PermissionSet...
17
3135
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) Me.lboxRP.SetSelected(newRPindex, True) When the last line executes, I get an error message:
0
1124
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 As String _ = "User ID=sa;password=some;Initial Catalog=bazaXml;Data Source=SZAKI"
6
2884
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 a denormalized mirror of the database, but I'm not having much luck getting the selection logic down (I haven't found a 'hook' where I can access the listbox object as an object to set the listitem's selected property before it gets rendered).. ...
7
4540
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 ASP.Net stuff when I need a Windows Form control. I've seen dual listbox populators in countless Windows applications, and have seen them run very fast, so I figured this would be extremely popular. Here's how it should work:
1
4409
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 work as in the notification area. Can anyone help ?
3
2300
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
1491
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
1444
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 were strangers to me . heres the aplication so can someone please explain to me how this aplication can be made . Thanks a bunch if u could do it . THE DOWNLOAD:DOwnload The CODES ARE AS FOLLOWS ..
0
10505
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10275
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10253
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10033
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9085
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7576
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5471
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5606
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4149
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.