I want to change my Checkbox
states when I write any thing in a textbox
so I did
<asp:CheckBox ID="chkIceChest" Text="Ice Chest" runat="server" />
<asp:TextBox ID="txtIceChest" Text="$ cost" runat="server" CssClass="moch-cost" AutoPostBack="true" OnTextChanged="CalculateStand" />
and
protected void CalculateStand(object s, EventArgs e)
{
double total = 0, cost = 0;
if (txtIceChest.Text.Length > 0 && txtIceChest.Text != "$ cost")
{
cost = Convert.ToDouble(txtIceChest.Text.Replace("$", ""));
total += cost;
if (cost > 0) chkIceChest.Checked = true;
}
}
but it is not working !!!! why ?
UpdatePanel
to do something like this. :( – Michael Perrenoud Jun 12 at 16:39