javascript - How do I disable my ASP.NET AJAX ConfirmButtonExtender when page validation fails? -


I have received a submit button using Microsoft Expander to ask "Are you sure?" However, regardless of whether this page passes the client-side verification or not, the fire is taken without regard.

  & lt; Asp: text box id = "text box 1" runat = "server" /> & Lt; Asp: RequiredFieldValidator id = "RequiredFieldValidatorTextBox1" runat = "server" ControlToValidate = "TextBox1" error message = "requires first name" display = "dynamic" /> ... & lt; ASP: Button ID = "Button 1" Runat = "Server" text = "submit" reason validity = "true" /> & Lt; AjaxToolkit: ConfirmButtonExtender id = "ConfirmButtonExtenderButton1" runat = "server" TargetControlID = "button1" confirmation text = "Are you sure?" / & Gt; ... & lt; ASP: Validation Best wishes ID = "validation1first1" run = "server" ShowMessageBox = "true" /> Therefore, if a user leaves a required field and clicks the "submit" button they will see two message boxes: 

For a verification.

Then confirm a ...

(Note: Cancel both OK and Cancel .)

To verify the verification does not confirm whether verification fails should be one or the other, how can I do it Not?


Update:

If I try to use ConfirmOnFormSubmit, I get this warning:

Validation (ASP .Net): The attribute 'ConfirmOnFormSubmit' element is not a valid attribute of 'ConfirmButtonExtender'.

Make sure ConfirmOnFormSubmit is set to true on ConfirmButtonExtender has been done.

From:

ConfirmOnFormSubmit - It is true that the confirmation dialog should wait before submitting the form to submit. This is useful when ASP.NET is in validated usage and should be confirmed only after having all the assumptions.

Edit: According to that website it is valid. Try or ignore intellisense and just watch what happens when you post it.


Comments