Solved

How to get rid of the validation errors from the bottom of the page

Posted on 2014-03-22
2
280 Views
Last Modified: 2014-03-23
I have this simple text box to input an e-mail address.
Email Address  <asp:TextBox ID="anTxbEmail" runat="server" AutoPostBack="true" OnTextChanged="CheckAccountExistence" Width="160px" BackColor="#00CC00" BorderColor="#00CC66" Font-Names="Calibri"></asp:TextBox>

Then I have attached a RequiredField validator....
<asp:RequiredFieldValidator ID="rfEmailAddress" runat="server" ControlToValidate="anTxbEmail" ErrorMessage="Email Required." Display="Dynamic" SetFocusOnError="true" />

Then I have attached  a Validation Summary...
<asp:ValidationSummary ID="ValidationSummary" ShowSummary="False"  ShowMessageBox ="true" runat="server"  />


Now the problem I have is when I click the OK button while having the email text box empty, yes it shows the error on the Message Box BUT it still shows the same error at the bottom of the page in spite of saying ShowSummary="False".

What I am not doing right here?
0
Comment
Question by:prain
2 Comments
 
LVL 29

Accepted Solution

by:
Paul Jackson earned 250 total points
ID: 39948192
I suspect what you are seeing is not the validation summary but the validator itself, you need to set the Display property to None :

<asp:RequiredFieldValidator ID="rfEmailAddress" runat="server" ControlToValidate="anTxbEmail" ErrorMessage="Email Required."  Display="None" SetFocusOnError="true" />
0
 

Author Closing Comment

by:prain
ID: 39948633
Perfect. Thank you :-).
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
has77  challenge 9 68
countHi challenge 25 86
Specific format 21 144
Error handling in PHP 5 51
Introduction A frequently used term in Object-Oriented design is "SOLID" which is a mnemonic acronym that covers five principles of OO design.  These principles do not stand alone; there is interplay among them.  And they are not laws, merely princ…
When we want to run, execute or repeat a statement multiple times, a loop is necessary. This article covers the two types of loops in Python: the while loop and the for loop.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…

747 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

10 Experts available now in Live!

Get 1:1 Help Now