Quantcast
Channel: SharePoint 2010 - General Discussions and Questions forum
Viewing all articles
Browse latest Browse all 17574

take the first value of combobox

$
0
0

Hi,

I can not get the first item in the combobox selected because it is null .. the code is this?

 if (!string.IsNullOrEmpty(prova))
                {
                   string[] valori = prova.Split('-');
                 
                
                    ddl_ref.Visible = true;
            
                for (int i = 0; i< valori.Length ; i++)
                  
                    {
                       
                        ListItem selectedListItem = cb_soc.Items.FindByValue(valori[i]);
                            if (selectedListItem != null)
                                selectedListItem.Selected = true;
                         Hidden_SocietaSel.Value += valori[i] + "-";
                       
                       
                    }
how could I do?

selectedListItem result null.

Thanks in advance.. it is very urgent.

Camilla.

 


Viewing all articles
Browse latest Browse all 17574

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>