473,657 Members | 2,528 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ErrorMessage display with validators

Hi all,

Is there any way to customize the error message display with
validators. For example, with the following snippet:

<tr>
<td>
<asp:RequiredFi eldValidator runat="server"
ControlToValida te="userName" Display="Dynami c"
EnableClientScr ipt="false" ErrorMessage="P lease enter your
name"></asp:RequiredFie ldValidator>
</td>
</tr>

The container row and cell are always rendered. Is it possible to
somehow have the html elements inside the validator with a placeholder
telling it where to display the error message, so that they're only
rendered when an error occurs?

Thanks,

Paul

May 29 '06 #1
1 1116
Does anyone know if this is possible?

Thanks,

Paul

May 29 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1115
by: rufus | last post by:
I have a validator and I dont want the error message to display in the page but rather only in the validationsummary. How do I do this? Thanks.
2
3311
by: Arjen | last post by:
Hello, I have a table record with two validators. The can not be both false. When the first one will be false the errormessage will be placed at the left side of the record. When the second one will be false then the errormessage will be placed at the center of the record. That's the place where the first one will end if it was false too.
6
1620
by: Mark | last post by:
We have Validators embedded in an asp table server control. The table server control is necessary and cannot be replaced. We want to apply CSS formatting to the validators, but the validators have a default RED font that appears to be difficult to remove. We could hard code in a blank font color into the .aspx html for each validator, but that would defeat the purpose of the CSS. Is there a way to change the default RED color of...
4
10034
by: James | last post by:
Hello, I have a RequiredFieldValidator for several textbox controls on a form. Here's an example with the RequiredFieldValidator. EnableClientScript, Enabled, and Visible are set to true for the RequiredFieldValidator. <asp:textbox id="FirstName" MaxLength="25" runat="server"></asp:textbox>
3
1866
by: John Blair | last post by:
Hi, I have validators outside of a datagrid (for adding a new grid row) - however when i click "edit" column and then the "update" column of a grid row that has been edited - my other validators on the page fire which i don't want - i've tried to make them invisible - this hides the controls but i get a strange error when i click the Update column - i tried to disable them - they become disabled but i can see my error "*" appearing next...
1
2112
by: epigram | last post by:
I'm trying to use the ASP.NET validators to check some client-side business rules. I've got two ASP TextBox controls (call them tbxYear1 and tbxYear2) used to enter a range of years. I've got a couple things I need to check: 1) tbxYear1 and tbxYear2 are both optional, but if values are entered they have to integers and non-negative 2) if values are entered for both tbxYear1 and tbxYear2 then tbxYear1 must be less than tbxYear2 It...
1
1660
by: Gabriel Lozano-Morán | last post by:
When using the tabstrip control combined with a multipage (several pageview) there is a problem when using validators. The problem is that validation also occurs on the validators that are not on the currently selected pageview of the multipage. To prevent this from happening I disable all the validators and only enable the validators on the selected page but does not look to me like the correct way of working. Is there a better way to...
2
1876
by: PeterKellner | last post by:
I'm wanting to just show the error in a ValidationSummary control, not next to the actual TextField I'm putting a RequiredFieldValidator next to. I don't even want the little "*" showing which field it is. (strange requirement, but that's the way it is). I've found that if I set the attribute Text="" (zero length string), it always uses the ErrorMessage instead of Text. I need the ErrorMessage because that is what is going to show up...
0
1268
by: André Nobre | last post by:
Hi all, I´m having a little trouble with a requiredfieldvalitor in a custom control. I put a validator in runtime, as this code: protected override void OnInit(EventArgs e) { if (this.ValidationRequired) { reqField = new RequiredFieldValidator(); reqField.ControlToValidate = this.ID; reqField.Text = "&nbsp;&nbsp;<img src=\"http://localhost/Extra/Images/Structure/exclamacao.gif\">";
0
8425
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8326
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8743
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8522
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7355
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6177
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4333
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2745
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1736
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.