In my WebForm
I want the total price changed when the user check one product but I have this problem with my code ,
the CheckedChanged
eve
All ASP.NET Server controls except Button
, Hyperlink
and LinkButton
have a default AutoPostBack
property of false
, So you should set AutoPostBack="true" in your CheckBox
:
<asp:CheckBox ID="ckb1" runat="server" AutoPostBack="true" OnCheckedChanged="ckb1_CheckedChanged" />
It is firing only when I click the button
As I said this is because the Button
have AutoPostBack
property of true
by default so after you checked the CheckBox
and then click the button the CheckBox
state automatically posts back to the server.