PostBack clearing errors!!! help
when i select the acknowledgement checkbox that has autopostback, all errors on my page is cleared and will allow form submission. it is set to autopostback to enable the submit image button in some cases that i've tested the page has been submitted with errors visible. please help code below.
-----code on page -----
<telerik:RadButton ForeColor="white" ID="RegisterCheckBox" OnClick="RegisterCheckBox_CheckedChanged" runat="server" ToggleType="CheckBox" ButtonType="ToggleButton"
AutoPostBack="true" CausesValidation="true" EnableEventValidation="false" >
<ToggleStates>
<telerik:RadButtonToggleState Text="Acknowledgement" />
<telerik:RadButtonToggleState Text="Acknowledgement" />
</ToggleStates>
</telerik:RadButton>
<asp:ImageButton ImageUrl="images\create_button_grey.png" Visible="false" ID="CreateUserButtonDisable" runat="server"
onclck="CreateUserButton_Click" />
<asp:ImageButton ImageUrl="images\create_button.png" Visible="true" ID="CreateUserButton" runat="server"
onclick="CreateUserButton_Click" />
-----code behind page-----
protected void RegisterCheckBox_CheckedChanged(object sender, EventArgs e)
{
CreateUserButton.Visible = RegisterCheckBox.Checked;
CreateUserButtonDisable.Visible = !RegisterCheckBox.Checked;
CreateUserButton.Enabled = CreateUserButton.Visible;
CreateUserButtonDisable.Enabled = false;
}
|