Solved

Javascript __doPostback ignores Validation controls

Posted on 2014-10-22
2
351 Views
Last Modified: 2014-10-22
Hi I have a form with a save button, this save button fires validation controls.

I also have a section of the form that if a response is given I just want to save the form, without the users having to press the Save button, they have to select YES from a confirm dialog box.

I'm doing this like so:

                if(arg == true){
                   
                    __doPostBack("<%=butSave.UniqueID%>", "");
                }

But its missing all the validation controls, how can I fix this?

Andy
0
Comment
Question by:Andy Green
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 11

Accepted Solution

by:
louisfr earned 500 total points
ID: 40396787
Found a page (http://forums.asp.net/t/1349427.aspx?js+__dopostback+and+Validation+Controls) with the following code sample:
if (Page_ClientValidate("mygroup"))
   __doPostBack(parameters);

Open in new window

0
 
LVL 3

Author Closing Comment

by:Andy Green
ID: 40396841
Excellent thank you. I did search but missed this one.

Andy
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

615 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question