1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
....
<asp:Button ID="submit_change" Text="changez votre argent" runat="server" CssClass="bouton" />
...
public partial class defaultPage : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
int[] aValues = new int[91];
int iValue = 10;
for (int i = 0; i < 91 ; i++)
{
aValues[i] = iValue++;
}
montantDD.DataSource = aValues;
montantDD.DataBind();
//focus sur les champs formualaire
montantDD.Attributes.Add("onchange", "updateMessage()");
email.Attributes.Add("onblur", "updateMessage()");
libre.Attributes.Add("onclick", "getChoice(this)");
libre.Attributes.Add("value", "usage libre");
restreint.Attributes.Add("onclick", "getChoice(this)");
restreint.Attributes.Add("value", "usage restreint");
confirme.Attributes.Add("onclick", "getConfrimation(this)");
submit_change.Attributes.Add("onclick", "getConfrimation(this)");
// ok
IDmessage.Text = "bolo";
}
}
private void submit_change_Click (object sender, EventArgs e)
{
IDmessage.Text = "bola";
}
} |
Partager