I have a checkbox that is set to “false” as default in the aspx. Then there is a function that determines whether it is true or false, the problem is that when on the page there is a textbox and this textbox has a TextChange Event on it, when i type something in the textbox and then go to the checkbox which at this time is visible the first time i click the whole page postbacks and resets the checkbox to unchecked.. then i need to click it again and then it sticks.. what can I do to make it stick at the first click?
Can I use some javascript for this or what do you think my options are?
protected void myTextbox_TextChanged(object sender, EventArgs e)
{
ShowCheckBox(true);
}
private void ShowCheckBox(bool ckVal)
{
myCheckBox.Visible = ckVal;
}
why not add the textbox inside an update panel something like this: