473,748 Members | 2,688 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Display message when RequiredFieldVa lidator fired

Hello,

I have a form with 5 textbox for each one a RequiredFieldVa lidator I show
(*) if the field is missing when I post the form.

I'd like when a least one of theses RequiredFieldVa lidator fired display an
another message (other then ErrorMessage). Is there a way to do that ?

Thanks,
Nov 19 '05 #1
5 2199
Which is it, you want an asterisk or a message, it can't be both.

"Christian Ista" <ml@cista.be> wrote in message
news:ub******** ******@TK2MSFTN GP15.phx.gbl...
Hello,

I have a form with 5 textbox for each one a RequiredFieldVa lidator I show
(*) if the field is missing when I post the form.

I'd like when a least one of theses RequiredFieldVa lidator fired display
an another message (other then ErrorMessage). Is there a way to do that ?

Thanks,

Nov 19 '05 #2
Which is it, you want an asterisk or a message, it can't be both.


That's the point, I'd like both.

An asterisk is displayed next to the field and I'd like an another comment
in an another location.

Thanks,
Nov 19 '05 #3
Set the text (between the <> and </>) to * and the Error message to "blah".
Then drop on the summary and on the validator set the Display=Static

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Christian Ista" <ml@cista.be> wrote in message
news:O5******** ******@TK2MSFTN GP09.phx.gbl...
Which is it, you want an asterisk or a message, it can't be both.


That's the point, I'd like both.

An asterisk is displayed next to the field and I'd like an another comment
in an another location.

Thanks,

Nov 19 '05 #4
So, you'd like to have an * next to the textbox, but a more helpful error
message somewhere else? That can be accomplished.

The RequiredFieldVa lidator (as well as the other Validation controls) have
two properties you should be interested in. The first is the ErrorMessage
property, and the second is the Text property. Set the ErrorMessage property
to "This field is required", and the Text property to "*". Then, add a
ValidationSumma ry control to the top of your form.

If validation errors occur, the Text property ("*") will be the one
displayed next to the TextBox, while the ErrorMessage property will be the
one displayed in the ValidationSumma ry control.

Hope this helps,
Johann MacDonagh

"Christian Ista" <ml@cista.be> wrote in message
news:ub******** ******@TK2MSFTN GP15.phx.gbl...
Hello,

I have a form with 5 textbox for each one a RequiredFieldVa lidator I show
(*) if the field is missing when I post the form.

I'd like when a least one of theses RequiredFieldVa lidator fired display
an another message (other then ErrorMessage). Is there a way to do that ?

Thanks,

Nov 19 '05 #5
I suggest you display the asterisk next to all the required fields to begin
with in order to "pre-indicate" which fields are required. That's common
practice these days.

Ray at work

"Christian Ista" <ml@cista.be> wrote in message
news:ub******** ******@TK2MSFTN GP15.phx.gbl...
Hello,

I have a form with 5 textbox for each one a RequiredFieldVa lidator I show
(*) if the field is missing when I post the form.

I'd like when a least one of theses RequiredFieldVa lidator fired display an another message (other then ErrorMessage). Is there a way to do that ?

Thanks,

Nov 19 '05 #6

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

Similar topics

0
453
by: Newbie | last post by:
i have a c# asp.net webform wherein i'm using requiredfieldvalidator and regularexpressionvalidator controls to validate the textboxes. i have a button "Close" that should work like this: When the user clicks "Close", a message box appears asking "Do u want to save this...? Yes|No". if the user clicks "yes", the requiredfieldvalidator and regularexpressionvalidator controls will validate the data in the textboxes and save them in the...
6
2434
by: dale zhang | last post by:
Hi, I build a web form with a 4-cell table on the top (flawlayout), followed by some labels and textboxes (gridlayout). The web form is displayed well in dell m60 laptop with all resolution options and DPI options. However when I tried to run it in a dell P3 desktop, labels and textboxes overlapped each other and they were in table area too. Any suggestions? Do I have to put all controls in table cells?
4
10045
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>
4
16757
by: Milan | last post by:
Hi, I am having a problem with displaying a * to a required field. There seems to be a problem with this and the static value does not appear unless you submit the page. I am trying to display the static text as soon as the page is loaded in the browser. Does anyone know if there is a bug with the aps.net validator controls? Or is this not possible.
1
1115
by: ChInKPoInt CumPeeWaRe [No MCSD] | last post by:
I have a (1) Textbox and (2) Dropdownlist (1) is using RequiredFieldValidator (2) is using AutoPostBack Now, the problem is: when (2) is fired up and it reloads the page which erases the error message displayed in (1). Any solutions or tips to solve this problem? C.P.
1
1120
by: paul.hester | last post by:
Hi all, Is there any way to customize the error message display with validators. For example, with the following snippet: <tr> <td> <asp:RequiredFieldValidator runat="server" ControlToValidate="userName" Display="Dynamic" EnableClientScript="false" ErrorMessage="Please enter your
0
1275
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\">";
2
8478
by: rn5a | last post by:
The different Validation controls like RequiredFieldValidator, RangeValidator etc. have a property named Display. This property can have 3 values - Dynamic, Static & None. What's the difference between the Dynamic Display & Static Display? Also suppose a Form has 2 TextBoxes & both the TextBoxes have the RequiredFieldValidator. The Form has a Button as well. <form runat="server"> First Name: <asp:TextBox ID="txtFName" runat="server"/>
3
11717
by: AG | last post by:
Below is code (slightly modified and converted to VB) that was provided to me in response to another post. I am using it to demonstrate another problem. In order for paging and other features to work properly in a gridview, viewstate must be enabled. So, in order to minimize the size of viewstate for a page, I will sometimes turn off viewstate for each control in template columns. That means that the gridview must be databound on each...
0
9561
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9381
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
9332
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
9254
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
8252
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
6799
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
6078
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
4608
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...
2
2791
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.