- Joined
- Jun 27, 2008
- Messages
- 1
- Reaction score
- 0
Hello,
I have two buttons. the first button test some condition and if its true it will add onclick attribute event on the second button. but when i call the event method of that button the onclick, which has a javascript "AlertPayment" code does not fire.. here's my code.. thank you
private void btSubmit_Click(object sender, System.EventArgs e)
{
if (bValid)
{ this.btHiddenSubmit.Attributes.Add("onclick", "return AlertPayment('" + sMessage + "');");
btHiddenSubmit_Click(sender, e); //calling the click method won't fire the onclick alertpayment javascript;
}
else
{
btHiddenSubmit_Click(sender, e);
}
}
------
private void btHiddenSubmit_Click_Click(object sender, System.EventArgs e)
{
.... my code here
}
I have two buttons. the first button test some condition and if its true it will add onclick attribute event on the second button. but when i call the event method of that button the onclick, which has a javascript "AlertPayment" code does not fire.. here's my code.. thank you
private void btSubmit_Click(object sender, System.EventArgs e)
{
if (bValid)
{ this.btHiddenSubmit.Attributes.Add("onclick", "return AlertPayment('" + sMessage + "');");
btHiddenSubmit_Click(sender, e); //calling the click method won't fire the onclick alertpayment javascript;
}
else
{
btHiddenSubmit_Click(sender, e);
}
}
------
private void btHiddenSubmit_Click_Click(object sender, System.EventArgs e)
{
.... my code here
}