vb.net - Selecting an item in an list box (asp.net 3.5) -


Say I have a listbox LB, which I am using:

  lb.DataSource ===  

Word list \\ wordList string is a list of lb.DataBind ()

listboxes are fully initialized, and everything Should also be visible.

However, now I select an item from the list box with my mouse (if it means what is meant in "select", it is giving dark blue color), and do the following test :

  If lb.SelectedIndex and lt; & Gt; -1 then doSomething () EndIf  

or Execution:

  If no lb.SelectedItem is nothing then something () EndIf  < / Ex> 

etc ..

In any way, when it is debugging then the blocks are not recorded, then there is definitely a claim that lb.selectedindext IS -1, lb .SelectedItem IS nothing, and so on.

What am I doing wrong? Why does not this recognize my selection ?? 10x

Is it possible that you also listback the databanks () in postback? You may have to put it (binding) in

 , to ensure that you do not want to lose yourself (! IsPostback) {..}  

Select the customer.


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -