Search code examples
c#asp.netvisual-studio-2010requiredfieldvalidatorrequired-field

How can I display which fields still need to be filled in using ASP.NET and C#?


I'm currently working on a web form in Visual Studio 2010 using C# and ASP.NET. It's a simple form - an online application - with several required fields. I already have regular expressions and required field validators in place, which display red asterisks when a field is left blank, but they're relatively hard to see.

Our users are a bunch of cowboys and ranch hands, so they'll just keep clicking 'Continue' if they don't immediately see what they're missing.

Is there a way to print at the bottom of the page which fields are missing?

Thanks in advance, Ellie


Solution

  • Place the ValidationSummary contol right above the buttons at the end of the form.

    Introduction to the ValidationSummary Control