none
ASP.NET and User Control validation on web page RRS feed

  • Question

  • Hi,

    We have asp.net web application and we created user control for date dropdowns. We use this date user control on all web pages. On some pages, we need to validate whether selected date is weekend or holiday as per our database table. This validation is done in user control custom validator control server side event getting data from database.

    All those pages have Telerik RadGrid controls which are client bound. 

    When user selects holiday as date and does data entry into Grid and clicks on submit button, validation fails and grid clientside bind happens erasing all entries.

    How can I make user control to have client side validation. Some said using JSON get data from database and validate. 

    Please share code or suggest options.

    Thank you,

    Thursday, March 26, 2020 3:55 PM

All replies

  • One direction is Data annotations.

    Also please consider asking this same question here https://forums.asp.net/


    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    Thursday, March 26, 2020 5:03 PM
    Moderator
  • You could post to the Web form forum at ASP.NET forums for possible help.

    http://forums.asp.net/

    Thursday, March 26, 2020 5:07 PM