473,989 Members | 1,880 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Issue with ValidationSumma ry Control, ErrorMessage and Text

I'm wanting to just show the error in a ValidationSumma ry control, not
next to the actual TextField I'm putting a RequiredFieldVa lidator 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 in the
ValidationSumma ry control.

Any ideas how to force the text to blank right next to the control?

Thanks,
Peter Kellner
http://peterkellner.net
May 16 '06 #1
2 1902
Hi Peter,

Does it do what you want if you set the validator to display="None" ?

Ken
Microsoft MVP [ASP.NET]

<%@ Page Language="VB" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">

<script runat="server">

</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitl ed Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:textbox id="TextBox2" runat="server"> </asp:textbox>
<asp:requiredfi eldvalidator id="RequiredFie ldValidator1"
runat="server" controltovalida te="TextBox1" display="None"
errormessage="R equiredFieldVal idator"></asp:requiredfie ldvalidator><br />
<br />
<asp:textbox id="TextBox1" runat="server"> </asp:textbox>
<asp:requiredfi eldvalidator id="RequiredFie ldValidator2"
runat="server" controltovalida te="TextBox2"
errormessage="R equiredFieldVal idator"></asp:requiredfie ldvalidator><br />
<br />
<asp:validation summary id="ValidationS ummary1" runat="server" />
<br />
<br />
<asp:button id="Button1" runat="server" text="Button" /></div>
</form>
</body>
</html>
"PeterKelln er" <pk**********@7 3rdstreet.com> wrote in message
news:ap******** *************** *********@4ax.c om...
I'm wanting to just show the error in a ValidationSumma ry control, not
next to the actual TextField I'm putting a RequiredFieldVa lidator 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 in the
ValidationSumma ry control.

Any ideas how to force the text to blank right next to the control?

Thanks,
Peter Kellner
http://peterkellner.net

May 16 '06 #2
On Tue, 16 May 2006 19:10:05 -0400, "Ken Cox [Microsoft MVP]"
<BA**********@h otmail.com> wrote:
Hi Peter,

Does it do what you want if you set the validator to display="None" ?

Ken
Microsoft MVP [ASP.NET]


Yes it does. And, Thank you Ken.
Peter Kellner
http://peterkellner.net
May 16 '06 #3

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

Similar topics

0
2012
by: John Mabbott | last post by:
Hello all, We're getting some weird behavior with the ValidationSummary control. If I submit a page that fires some validators, the ValidationSummary displays them correctly. However, if I subsequently submit the page, the ValidationSummary control briefly disappears before re-appearing again! So, to recap: 1. I load one of my pages 2. I don't fill any of the input boxes and submit the page, causing
1
360
by: mg | last post by:
Is there a way to include in a ValidationSummary an error message that says that an exception was thrown or that an if/else test went to 'else' ?
3
1660
by: Mike | last post by:
Is there a way to reference the value of a validationsummary control? I have a need to display any validation errors on my pages in a unique way and the normal output of the validationsummary control does not meet that requirement. However if I were able to capture the output that the validationsummry writes to the screen, into a string variable that would most likely solve my problem. Any one have any ideas?
4
1437
by: andersoj | last post by:
I have a page that has some required field validators created in the aspx, and other validators created in the Page_Load event. In IE, all validation works as expected. In Firefox, ASPX validators work fine, but the validators created in the code-behind do not. Am I adding the validators to the wrong control on the page? Right now I'm finding the main form control and adding them to that. Adding to Page.Validators didn't work.
2
6300
by: c676228 | last post by:
Hi, I have several user controls like email, phone,ssn etc. each has it's own validation message in its user control already. When I bring all those user controls in an aspx page, I would like to display a summary error messages using validation summary in an aspx page, how to do that? Thank you. -- Betty
0
1109
by: MattB | last post by:
I have a (asp.net 1.1) page that loads a bunch of user controls based on some database data. The User Controls have input controls and associated validators on them, and I wanted to place a validation summary at the bottom of the page. First thing I tried was making the ValidationSummary into a User Control, but it wouldn't display anything when the validators (with "*" for the text, and an ErrorMessage entered). So I figured I'd just...
0
1147
by: Stephen | last post by:
I have a ValidationSummary tag in an aspx page: <asp:ValidationSummary ID="ErrorSummary" ShowSummary="true" DisplayMode="BulletList" HeaderText="Please review the following errors:" runat="server" / > In my code-behind, I have this code: CustomValidator cstmval = new CustomValidator(); cstmval.ErrorMessage = "There is problem with the database."; ErrorSummary.Controls.Add(cstmval);
2
1815
by: Code Rodent | last post by:
Hi there, Please please could someone shed some like on a problem that I'm having using a combination of Wizards, ValidationGroups and ValidationSummary controls. What I want to do is to have a wizard that will take me through several steps, and at each step validate input data using RequiredFieldValidators etc. displaying any errors in a Validation Summary. The problem that I have is that I cannot seem to have a ValidationSummary...
0
1818
by: Code Rodent | last post by:
Hi there, Please please could someone shed some like on a problem that I'm having using a combination of Wizards, ValidationGroups and ValidationSummary controls. What I want to do is to have a wizard that will take me through several steps, and at each step validate input data using RequiredFieldValidators etc. displaying any errors in a Validation Summary. The problem that I have is that I cannot seem to have a ValidationSummary...
0
10403
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
10227
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
11490
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...
0
10984
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
10154
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
8545
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
7693
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6496
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
3836
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.