Connect a DS to a textbox in ASP.net

  • Thread starter Thread starter Andrea Lodigro
  • Start date Start date
A

Andrea Lodigro

Hi,
I've got a listbox linked to a DataSet in this way:
// connetto la lista di clienti ai dati
this.lbClienti.DataSource =
GestoreClientiDistributori.caricaElencoClienti().Tables[0];
// imposto DENIMINAZIONEBREVE come valore visualizzato
this.lbClienti.DataTextField = "DENOMINAZIONEBREVE";
// imposto CODICE come valore nascosto
this.lbClienti.DataValueField = "CODICE";
// eseguo il binding dei dati
this.lbClienti.DataBind();
the first instrution assign the datasource as a dataset.

Now when I select a value from the listbox I would like to
connect someother controls (textbox) to the other
information associated with that list element.

Is it possible?
Thanks,
Andrea
 
I've got the list element, but I would like to retrieve
the other values from the ds without interrogating again.
Is it possible?
 
I've got the list element, but I would like to retrieve the other values
from the ds without interrogating again.
Is it possible?

I'm not sure if I understand. If you use autopostback and capture
SelectedIndexChanged in your source file, you can look up whatever
information is associated with that list item and put it in the text box.

Use a dataset and store it in a [SESSION] variable to prevent unecessary
database connections.

However, if you want something like Nvidia's driver selection listboxes
without posting the page back, you will have to write it in javascript.

I'm afraid your code isn't very informative. A word of advice, if you
write your code in English at all times it will be easier to get help, both
by giving examples of your code and searching for similar code phrases.
 
Back
Top