Bonjour,
je souhaiterais ajouter un évènement genre OnKeyPress à un textBox, mais je n'arrive à rien.
pour l'instant j'ai fait cela :
Mais évidemment cela ne fonctionne pas, je sais pas trop comment m'y prendre.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12 protected void Page_Load(object sender, EventArgs e) { tbBatiment.KeyPressed += new KeyEventHandler(tbBatiment_keyUp, tbBatiment.Text); } private void tbBatiment_keyUp(object sender, KeyPressEventArgs e) { Ot_Collection<Od_Batiment> ods_bats = Om_Batiment.SelectBatiment(tbBatiment.Text); Batiments = ods_bats; }
merci
nath
Partager