Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2014-03-22
2
Medium Priority
?
288 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 29

Accepted Solution

by:
Paul Jackson earned 1000 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
Having just graduated from college and entered the workforce, I don’t find myself always using the tools and programs I grew accustomed to over the past four years. However, there is one program I continually find myself reverting back to…R.   So …
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to selectively show certain fields based on user input using rules to gather relevant information and data from your forms. The rules feature provides you with an opportunity…

722 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