Wrox Programmer Forums
BOOK: Beginning ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old January 8th, 2011, 04:06 AM
Authorized User
Join Date: Jun 2010
Posts: 24
Thanks: 10
Thanked 0 Times in 0 Posts

I want my detailsview validationsummary to display all the errors in the user's input, in one popup screen....but you're saying that due to their different behaviours that won't be possible?
Old January 8th, 2011, 04:30 AM
Imar's Avatar
Wrox Author
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts

Not without a lot of custom programming. The other controls are validated at the client and result in a message box being shown *before* the page posts back. The Calendar is validated at the server after a postback and doesn't result in the ValidationSummary displaying a message.

If you want to group all errors, you have many options, including:

1. Don't use client side validation and display all error messages as HTML after a postback using the ShowSummary setting of the Validation Summary

2. Use the above, but implement client script that alerts the contents of the validation summary after a postback.

Alternatively, use a different Calendar (from the AJAX toolkit for example: http://wiki.asp.net/page.aspx/417/calendar-extender/ or from jQuery UI: http://jqueryui.com/demos/datepicker/) that works with client side validation as well. Then you can write a client function for the CustomValidator control to inject the error message in the alert box.


Imar Spaanjaars
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!

Similar Threads
Thread Thread Starter Forum Replies Last Post
Standalone validation + web form validation morbo Struts 0 August 19th, 2008 04:02 AM
Validation using Validation Framework kalyangvd Struts 1 January 2nd, 2008 06:53 AM
validation dhaval229 ASP.NET 1.0 and 1.1 Professional 2 February 14th, 2006 02:10 PM
Validation g_vamsi_krish ASP.NET 1.0 and 1.1 Professional 2 January 11th, 2006 06:46 AM
Validation NiNe ASP.NET 1.x and 2.0 Application Design 1 July 5th, 2005 10:27 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.