Click here to Skip to main content
15,167,702 members
Home / Discussions / C#
   

C#

 
GeneralRe: convert xdocument to integer Pin
rachel_m11-Sep-12 17:04
Memberrachel_m11-Sep-12 17:04 
GeneralRe: convert xdocument to integer Pin
Eddy Vluggen11-Sep-12 21:55
professionalEddy Vluggen11-Sep-12 21:55 
GeneralRe: convert xdocument to integer Pin
rachel_m12-Sep-12 5:44
Memberrachel_m12-Sep-12 5:44 
GeneralRe: convert xdocument to integer Pin
PIEBALDconsult13-Sep-12 4:29
professionalPIEBALDconsult13-Sep-12 4:29 
GeneralRe: convert xdocument to integer Pin
Pete O'Hanlon11-Sep-12 23:16
mvaPete O'Hanlon11-Sep-12 23:16 
QuestionCOM+ Event System Pin
Member 813710511-Sep-12 12:40
MemberMember 813710511-Sep-12 12:40 
AnswerRe: COM+ Event System Pin
Bernhard Hiller11-Sep-12 21:24
MemberBernhard Hiller11-Sep-12 21:24 
Question.Net Validation Pin
rmorton11-Sep-12 9:45
Memberrmorton11-Sep-12 9:45 
Good afternoon,

I have a simple form that using c# server side validation. When using a radio button or dropdownlist with autopostback, I have to call Page.Validate(); within the code behind method. When I do this, it does not run the Javascript on the page that overrides the default functions of the c# validation.

How can I get the javascript - ValidatorUpdateDisplay function to run when i call the Page.Validate() call in the autopostback method?

Thanks in advance!

Rob

Javascript:
JavaScript
<pre lang="cs">// Form Validation: Change TextBox CSS for outline color
    ValidatorUpdateDisplay = function (val) {

        var ctl = $('#' + val.controltovalidate);
        var eCount = 0;



        for (var i = 0; i < Page_Validators.length; i++) {

            var v = Page_Validators[i];
            if (v.controltovalidate == val.controltovalidate) {

                if (!v.isvalid) {
                    eCount++;
                        ctl.addClass('validationError');
                        $('td.question:eq(' + i + ')').addClass('someClass');

                }

            };
        }



        if (eCount > 0) {
            ctl.addClass('validationError');

        } else {
            ctl.removeClass('validationError');
            // $('td.question:eq(' + i + ')').removeClass('someClass');
        }
        if (typeof (val.display) == "string") {
            if (val.display == "None") {
                return;
            }
            if (val.display == "Dynamic") {
                val.style.display = val.isvalid ? "none" : "inline";
                return;
            }
        }
        if ((navigator.userAgent.indexOf("Mac") > -1) &&
            (navigator.userAgent.indexOf("MSIE") > -1)) {
            val.style.display = "inline";
        }
        val.style.visibility = val.isvalid ? "hidden" : "visible";


    }



Answeroracle exception Pin
yaswanth00111-Sep-12 8:19
Memberyaswanth00111-Sep-12 8:19 
AnswerRe: oracle exception Pin
Andrei Straut11-Sep-12 8:28
MemberAndrei Straut11-Sep-12 8:28 
AnswerRe: oracle exception Pin
Abhinav S11-Sep-12 8:56
MemberAbhinav S11-Sep-12 8:56 
GeneralRe: oracle exception Pin
Pete O'Hanlon11-Sep-12 8:58
mvaPete O'Hanlon11-Sep-12 8:58 
QuestionError Logging Pin
CodingYoshi11-Sep-12 4:26
MemberCodingYoshi11-Sep-12 4:26 
AnswerRe: Error Logging Pin
Pete O'Hanlon11-Sep-12 4:47
mvaPete O'Hanlon11-Sep-12 4:47 
GeneralRe: Error Logging Pin
CodingYoshi11-Sep-12 4:53
MemberCodingYoshi11-Sep-12 4:53 
GeneralRe: Error Logging Pin
Pete O'Hanlon11-Sep-12 5:07
mvaPete O'Hanlon11-Sep-12 5:07 
AnswerRe: Error Logging Pin
Eddy Vluggen11-Sep-12 6:18
professionalEddy Vluggen11-Sep-12 6:18 
AnswerRe: Error Logging Pin
Abhinav S11-Sep-12 8:50
MemberAbhinav S11-Sep-12 8:50 
GeneralRe: Error Logging Pin
CodingYoshi11-Sep-12 14:57
MemberCodingYoshi11-Sep-12 14:57 
GeneralRe: Error Logging Pin
Pete O'Hanlon11-Sep-12 23:17
mvaPete O'Hanlon11-Sep-12 23:17 
QuestionHow to control mediaelement from the server terminal? Pin
ylchau11-Sep-12 0:10
Memberylchau11-Sep-12 0:10 
AnswerRe: How to control mediaelement from the server terminal? Pin
Pete O'Hanlon11-Sep-12 0:19
mvaPete O'Hanlon11-Sep-12 0:19 
GeneralRe: How to control mediaelement from the server terminal? Pin
ylchau11-Sep-12 17:27
Memberylchau11-Sep-12 17:27 
GeneralRe: How to control mediaelement from the server terminal? Pin
Pete O'Hanlon11-Sep-12 23:42
mvaPete O'Hanlon11-Sep-12 23:42 
QuestionDatagridview Sort By number Pin
mohammadkaab10-Sep-12 22:52
Membermohammadkaab10-Sep-12 22:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.