473,320 Members | 2,124 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Tags Ok In Text of Validator Control?

Is this ok? I haven't seen any examples of it, but it looks like it should
work:
<asp:requiredfieldvalidator id="valreqUserName" runat="server"
controltovalidate="txtUserName"
errormessage="Please enter the user name">
<span title="Please enter the user name">
<img src="../../images/bullet.gif">
</span>
</asp:requiredfieldvalidator>
--
John Saunders
Internet Engineer
jo***********@surfcontrol.com
Nov 17 '05 #1
5 1738
Hi John,

You are right. It's possible to display error using inline error message or
client element.

As an alternative to using the Error Message property for the control, you
can display an error for the control by simply writing it between the open
and close tags for the Validation control. However, unlike the error
Message property, which only supports text-based errors, an inline error
message can contain other client side elements, such as images. Here is a
sample for your reference:

<input type =text id="TextFirstname" value ="Enter First Name" runat
=server >

<asp:RequiredFieldValidator
id="RequiredFieldValidator1"
style="Z-INDEX: 103; LEFT: 248px; POSITION: absolute; TOP: 56px"
ControlToValidate="TextFirstname"
InitialValue="Enter First Name"
display="Dynamic"
runat="server">

<img src="http://localhost/1.jpg">

</asp:RequiredFieldValidator>

I hope this helps.

Best Regards,
Lewis Wang
Support Professional

This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| From: "John Saunders" <jo***********@surfcontrol.com>
| Subject: Tags Ok In Text of Validator Control?
| Date: Wed, 23 Jul 2003 14:13:27 -0400
| Lines: 17
| Organization: SurfControl, Inc.
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <uJ**************@TK2MSFTNGP11.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: host254wb.surfcontrol.com 65.194.40.254
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP11.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:161469
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Is this ok? I haven't seen any examples of it, but it looks like it should
| work:
|
|
| <asp:requiredfieldvalidator id="valreqUserName" runat="server"
| controltovalidate="txtUserName"
| errormessage="Please enter the user name">
| <span title="Please enter the user name">
| <img src="../../images/bullet.gif">
| </span>
| </asp:requiredfieldvalidator>
| --
| John Saunders
| Internet Engineer
| jo***********@surfcontrol.com
|
|
|

Nov 17 '05 #2
Thanks, Lewis. I can see I'll be using this in the future.

I may even create my own derived validator controls, overriding the
ErrorMessage property and adding an ErrorImageUrl property. This would
save me re-typing the error message.

Thanks,
John Saunders
jo***********@surfcontrol.com

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 17 '05 #3
Hi John ,

Good idea!
Thanks very much for participating the community.

Lewis Wang
Support Professional

This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| From: John Saunders <jo***********@surfcontrol.com>
| References: <5E**************@cpmsftngxa06.phx.gbl>
| X-Newsreader: AspNNTP 1.50 (ActionJackson.com)
| Subject: RE: Tags Ok In Text of Validator Control?
| Mime-Version: 1.0
| Content-Type: text/plain; charset="us-ascii"
| Content-Transfer-Encoding: 7bit
| Message-ID: <u3**************@TK2MSFTNGP12.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| Date: Thu, 24 Jul 2003 05:28:07 -0700
| NNTP-Posting-Host: actionjackson133.dsl.frii.net 216.17.147.133
| Lines: 1
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP12.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:161705
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Thanks, Lewis. I can see I'll be using this in the future.
|
| I may even create my own derived validator controls, overriding the
| ErrorMessage property and adding an ErrorImageUrl property. This would
| save me re-typing the error message.
|
| Thanks,
| John Saunders
| jo***********@surfcontrol.com
|
| *** Sent via Developersdex http://www.developersdex.com ***
| Don't just participate in USENET...get rewarded for it!
|

Nov 17 '05 #4
Thanks, Lewis. I can see I'll be using this in the future.

I may even create my own derived validator controls, overriding the
ErrorMessage property and adding an ErrorImageUrl property. This would
save me re-typing the error message.

Thanks,
John Saunders
jo***********@surfcontrol.com

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 17 '05 #5
Hi John ,

Good idea!
Thanks very much for participating the community.

Lewis Wang
Support Professional

This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| From: John Saunders <jo***********@surfcontrol.com>
| References: <5E**************@cpmsftngxa06.phx.gbl>
| X-Newsreader: AspNNTP 1.50 (ActionJackson.com)
| Subject: RE: Tags Ok In Text of Validator Control?
| Mime-Version: 1.0
| Content-Type: text/plain; charset="us-ascii"
| Content-Transfer-Encoding: 7bit
| Message-ID: <u3**************@TK2MSFTNGP12.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| Date: Thu, 24 Jul 2003 05:28:07 -0700
| NNTP-Posting-Host: actionjackson133.dsl.frii.net 216.17.147.133
| Lines: 1
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP12.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:161705
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Thanks, Lewis. I can see I'll be using this in the future.
|
| I may even create my own derived validator controls, overriding the
| ErrorMessage property and adding an ErrorImageUrl property. This would
| save me re-typing the error message.
|
| Thanks,
| John Saunders
| jo***********@surfcontrol.com
|
| *** Sent via Developersdex http://www.developersdex.com ***
| Don't just participate in USENET...get rewarded for it!
|

Nov 17 '05 #6

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

Similar topics

8
by: Hostile17 | last post by:
Consider the following HTML. ---------- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"> <html> <head> <meta...
11
by: Barney Norris | last post by:
Hi, The W3C validator tells me this page isn't valid HTML 4.01 Strict: http://www-student.cs.york.ac.uk/~jban100/wont_validate.html The reason it gives is I've closed meta tags with a '/'...
21
by: Zenobia | last post by:
I can't understand the warning I'm getting from the W3C validator. Here it is, along with the source code that it is not fully satisfied with. What meta-tags should I be including? Here is the...
30
by: Toni Mcintyre | last post by:
i'm having 2 problems with the http://validator.w3.org 1. if i have: <meta http-equiv="Content-Script-Type" content="text/javascript"> then why do i need <script type=text/javascript>...
12
by: Stefan Weiss | last post by:
Hi. (this is somewhat similar to yesterday's thread about empty links) I noticed that Tidy issues warnings whenever it encounters empty tags, and strips those tags if cleanup was requested....
4
by: Rakesh | last post by:
Im using a cutom control to try to validate a text box to ensure that on the client side a validation expression is present to prevent the user from posting back html in their text box. I was only...
9
by: Alex Shirley | last post by:
Hi there I’m simply trying to check for a blank or empty value in a textbox on my webform. In this instance I do not want to use a requiredfieldvalidator, I want to use a customvalidator (as I...
8
by: Mark | last post by:
We have a multi-line textbox that users copy and paste email text into. The pasted text frequently will contain a tag like <blah@aol.com> or similar. I believe .NET is protecting itself from code...
10
by: Barry L. Camp | last post by:
Hi all... hope someone can help out. Not a unique situation, but my search for a solution has not yielded what I need yet. I'm trying to come up with a regular expression for a...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.