Bonjour, dans mon programme, j'ai ce bout de code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| protected void go_Click(object sender, EventArgs e)
{
ModalPopupExtender1.Hide();
try
{
connection.Open();
.....
MyCmd.ExecuteNonQuery();
connection.Close();
fill();
btnLocaliser.Attributes.Add("onClick", "javascript:findAddress('" + adresse.Text + "','" + statut.Text + "'); return false;");
}
catch (SqlException ex)
{
go.Attributes.Add("onclick", "javascript: return alert('Erreur :"+ex.ToString()+"');");
}
finally
{
connection.Close();
}
} |
tout marche bien sauf que la ligne :
btnLocaliser.Attributes.Add("onClick", "javascript:findAddress('" + adresse.Text + "','" + statut.Text + "'); return false;");
ne s'exécute pas
avez vous une idée ?
Partager