ASP.Net, Javascript

Posted on 2011-05-05
Last Modified: 2012-05-11
I am working in a .net C# 2010 web applciation.
One page contains lot of javascript functions to enable and disable controls and validators.
Depending on the serverside control values, I am enabling and disabling the validators in javascript.
But while running the application, I am getting Page.Isvalid = false and page is returning without saving the page.
I know, this is happening because, one of the validator is not visible in page but still it is validating the page.
Because of which i am not seeing the validation error, but valid is false.
My question is,
1. How can I see the error, if page.isvalid is false (when the validations are return in javascript)
2. How to debug javascript in VS 2010.

Question by:RameshLathu
    LVL 30

    Accepted Solution

    Not too sure what the issue could be but perhaps try:

    1) Give each validation control a value in the ErrorMessage property
    2) Add a ValidationSummary control to the page

    See if that makes a difference in whether the errors get reported. The ValidationSummary uses the text in the ErrorMessage property for the errors that are displayed either inline or on a summary form.

    Author Closing Comment


    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
    Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
    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…

    734 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

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now