View Single Post
Old 07-05-2012, 08:00 PM   PM User | #1
jay4
New to the CF scene

 
Join Date: Jul 2012
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
jay4 is an unknown quantity at this point
Angry 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;
}
jay4 is offline   Reply With Quote