views:

168

answers:

1

Hi

i am using asp.net routing

when using ValidatorEnable function in javascript i got this error 'Page_Validators is not defined' how to solve this?

i am using this code in my global.asax file

        routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

        routes.IgnoreRoute("{*allaspx}", new { allaspx = @".*\.aspx(/.*)?" });
        routes.IgnoreRoute("{*favicon}", new { favicon = @"(.*/)?favicon.ico(/.*)?" });
A: 

I had the same issue.

I solved it by executing the code that uses Page_Validators from the $(document).ready event.

MartinHN