locked
How force control validation(VAB) to false??? RRS feed

  • Question

  • User-2143080303 posted

    Hello

    I just have code:

    if (ViewState["arr"]!= null)
                {
    ....................................
    I have some code here
    ............................................
    } else
    
    (
    ....................................................
    and here i wonna force validators.validation  on false an showing error message
    ........................................................ )
    Iused VAB method for validate and completly havent idea how do this.
    Maybe some1 know it?
    Friday, July 1, 2011 10:44 AM

Answers

All replies

  • User-1635004338 posted

    Hi,

    Please refer this article:

    http://www.christophdebaene.com/blog/2006/12/29/validator-application-block-and-asp-net/

    Thanks,

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, July 5, 2011 4:40 AM
  • User-2143080303 posted

    THX for answer,I only wonna dynamicaly changes properities of existing validator.Change validation validator from true to false and show error message(force validation to false).

    That link , show how build custom VAB validator,but maybe some code in this examples will be helpfull.

    Tuesday, July 5, 2011 6:57 PM
  • User-2143080303 posted

    I tried do that :

    if (ViewState["arr"]!= null)
                {
    ....................................
    I have some code here
    ............................................
    } else
    
    (
    
    ValKolory.IsValid=false;..........ValKolory is validator
     ValKolory.Validate(); )

    but didnt show error mesage:(
    Thursday, July 7, 2011 6:47 PM