Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx thread: Problems with ListBox and SelectedIndexChanged Event..


Message #1 by "Salvador Gallego" <salvito@h...> on Fri, 14 Jun 2002 17:34:45
Hi, 

I'm trying to create a form who display a listbox with items, and I want 
to display another listbox which may be diferent according to the previous 
item selected. 

With the "SelectedIndexChange" event and the "Handles 
MyListBox.SelectedItemChanged" it returns the following error: 

Handles clause requires a WithEvents variable. 

But I don't have a Idea of what this could be... I'm not using any code-
behind aniway; Should I?

What can I do? 

Any Ideas? 

From Spain,

Salvador Gallego.

Thanks a lot in advance. 
Message #2 by david@p... on Mon, 24 Jun 2002 03:50:25
Salvador,

This is just a guess but when you declare MyListBox is it done as?...

 Protected WithEvents MyListBox As ListBox

David Adames
Florida




> Hi, 

> I'm trying to create a form who display a listbox with items, and I want 
t> o display another listbox which may be diferent according to the 
previous 
i> tem selected. 

> With the "SelectedIndexChange" event and the "Handles 
M> yListBox.SelectedItemChanged" it returns the following error: 

> Handles clause requires a WithEvents variable. 

> But I don't have a Idea of what this could be... I'm not using any code-
b> ehind aniway; Should I?

> What can I do? 

> Any Ideas? 

> From Spain,

> Salvador Gallego.

> Thanks a lot in advance. 

  Return to Index