Click here to Skip to main content
15,867,686 members
Home / Discussions / C#
   

C#

 
GeneralRe: convert xdocument to integer Pin
rachel_m11-Sep-12 16:04
rachel_m11-Sep-12 16:04 
GeneralRe: convert xdocument to integer Pin
Eddy Vluggen11-Sep-12 20:55
professionalEddy Vluggen11-Sep-12 20:55 
GeneralRe: convert xdocument to integer Pin
rachel_m12-Sep-12 4:44
rachel_m12-Sep-12 4:44 
GeneralRe: convert xdocument to integer Pin
PIEBALDconsult13-Sep-12 3:29
mvePIEBALDconsult13-Sep-12 3:29 
GeneralRe: convert xdocument to integer Pin
Pete O'Hanlon11-Sep-12 22:16
subeditorPete O'Hanlon11-Sep-12 22:16 
QuestionCOM+ Event System Pin
Member 813710511-Sep-12 11:40
Member 813710511-Sep-12 11:40 
AnswerRe: COM+ Event System Pin
Bernhard Hiller11-Sep-12 20:24
Bernhard Hiller11-Sep-12 20:24 
Question.Net Validation Pin
rmorton11-Sep-12 8:45
rmorton11-Sep-12 8: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 7:19
yaswanth00111-Sep-12 7:19 
AnswerRe: oracle exception Pin
Andrei Straut11-Sep-12 7:28
Andrei Straut11-Sep-12 7:28 
AnswerRe: oracle exception Pin
Abhinav S11-Sep-12 7:56
Abhinav S11-Sep-12 7:56 
GeneralRe: oracle exception Pin
Pete O'Hanlon11-Sep-12 7:58
subeditorPete O'Hanlon11-Sep-12 7:58 
QuestionError Logging Pin
CodingYoshi11-Sep-12 3:26
CodingYoshi11-Sep-12 3:26 
AnswerRe: Error Logging Pin
Pete O'Hanlon11-Sep-12 3:47
subeditorPete O'Hanlon11-Sep-12 3:47 
GeneralRe: Error Logging Pin
CodingYoshi11-Sep-12 3:53
CodingYoshi11-Sep-12 3:53 
GeneralRe: Error Logging Pin
Pete O'Hanlon11-Sep-12 4:07
subeditorPete O'Hanlon11-Sep-12 4:07 
AnswerRe: Error Logging Pin
Eddy Vluggen11-Sep-12 5:18
professionalEddy Vluggen11-Sep-12 5:18 
AnswerRe: Error Logging Pin
Abhinav S11-Sep-12 7:50
Abhinav S11-Sep-12 7:50 
GeneralRe: Error Logging Pin
CodingYoshi11-Sep-12 13:57
CodingYoshi11-Sep-12 13:57 
GeneralRe: Error Logging Pin
Pete O'Hanlon11-Sep-12 22:17
subeditorPete O'Hanlon11-Sep-12 22:17 
QuestionHow to control mediaelement from the server terminal? Pin
ylchau10-Sep-12 23:10
ylchau10-Sep-12 23:10 
AnswerRe: How to control mediaelement from the server terminal? Pin
Pete O'Hanlon10-Sep-12 23:19
subeditorPete O'Hanlon10-Sep-12 23:19 
GeneralRe: How to control mediaelement from the server terminal? Pin
ylchau11-Sep-12 16:27
ylchau11-Sep-12 16:27 
GeneralRe: How to control mediaelement from the server terminal? Pin
Pete O'Hanlon11-Sep-12 22:42
subeditorPete O'Hanlon11-Sep-12 22:42 
QuestionDatagridview Sort By number Pin
mohammadkaab10-Sep-12 21:52
mohammadkaab10-Sep-12 21: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.