Salut! je suis sur projet (asp/sqlserver) et j'ai un petit problème
mon problème:
j'ai un datagridview et je fais une requête sql pour charger ce datagrid
pour la méthode Update je suis bloqué je ne parvient pas récupérer la nouvelle valeur de la ligne sélectionnée
mon code:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
string Designation = ((TextBox)CarGv.Rows[e.RowIndex].FindControl("tb")).Text;
SqlCommand cmd = new SqlCommand();
cmd.CommandType = CommandType.Text;
cmd.CommandText = "update Carton set  Designation=@Designation where CodeCar='Car1'";
cmd.Parameters.Add("@Designation", SqlDbType.Text).Value = Designation;
quand j'affiche Designation j’obtiens toujours l'ancienne valeur de mon textbox (tb)
merci pour votre reponse