Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7179523
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T17:09:27+00:00 2026-05-28T17:09:27+00:00

We’ve an ASP.Net MVC2 web app (SQL 2008 in backend). We use Data Annotations

  • 0

We’ve an ASP.Net MVC2 web app (SQL 2008 in backend). We use Data Annotations at model level for all sprt of validations (hope its one of the best practices). So, our validations are performed on server side and errors (if any) are returned. Works fine.

Next, we’ve AJAX based postback jQuery plugin. In combination with MVC partial views, we’ve ‘AJAXified’ certain forms. I hope this is pretty much like a basic stuff with a little AJAX & jQuery.

Now, we want to bring the validation on client side as well (and still
persist the server side validation). We’ve found some simple &
basic way to have basic validations
like required, format,
range, etc… using bassistance jQuery. But what about certain server
side validations, like duplication check, etc.. what are the best
practices?

Note that we’ve simplified our web app by not including the default Microsoft AJAX libraries. We prefer simplified jQuery plugins. Also Microsoft js files weight several KB. Though it might lesson the effort but it requires several files.(Data Annotations Validation + jQuery.Ajax Post)

For example, jquery forms plugin looks simpler then the default MicrosoftAjax.

jQuery plugins are abstract & self contained thats one reason we’re away from the Microsoft scripts. Here’re some options –

SOLUTION #1:
Using ASP.Net Data Annotations validations using pure jQuery, AJAX,
JSON & Partial views

SOLUTION #2:
ASP.NET MVC Client-Side Validation Summary with jQuery Validation Plugin

We need to keep things simple, clean and optimal. For example, this looks complex –
ASP.Net MVC: Can you use Data Annotations / Validation with an AJAX / jQuery call?

If possible we’d prefer to keep the validation in one place instead of having to replicate it in data annotations as well as in jQuery.

Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T17:09:28+00:00Added an answer on May 28, 2026 at 5:09 pm

    But what about certain server side validations, like duplication
    check, etc.. what are the best practices?

    In ASP.NET MVC 3 you could use the [Remote] data annotation.

    In ASP.NET MVC 2 it doesn’t exist but you could implement it using jQuery.validate remote rule. This assumes that you use the jQuery validate plugin of course instead of the built-in Microsoft client side validation framework.

    Microsoft scripts are now obsolete. If you want to ease the migration towards ASP.NET MVC 3 and even 4 you should forget about those and use jQuery and jQuery validate which are the default client side frameworks now in ASP.NET MVC.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am trying to understand how to use SyndicationItem to display feed which is
Seemingly simple, but I cannot find anything relevant on the web. What is the
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I have a text area in my form which accepts all possible characters from
I want to construct a data frame in an Rcpp function, but when I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.