473,698 Members | 1,947 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Getting validator error message to appear without using page.validate

(apologies for the repost...I put this in the wrong newgroup the first
time...)

I have a text box that I have a custom validator attached to. I then have an
image button that is set to NOT cause validation (as there are other
validators on the page I don't want triggered).

The event handler for my imageButton is set up to validate the text box:

-------------
textbox.validat e

if textbox.isvalid then...
-------------

This works. If it's valid, it executes, if not, it doesn't. The problem is
that if it's not, the custom validator error text doesn't appear. Why is
that?

-Darrel

Mar 19 '07 #1
3 1617
this is what validation group names are for. put the button and the text
validator in the same group.

-- bruce (sqlwork.com)

darrel wrote:
(apologies for the repost...I put this in the wrong newgroup the first
time...)

I have a text box that I have a custom validator attached to. I then have an
image button that is set to NOT cause validation (as there are other
validators on the page I don't want triggered).

The event handler for my imageButton is set up to validate the text box:

-------------
textbox.validat e

if textbox.isvalid then...
-------------

This works. If it's valid, it executes, if not, it doesn't. The problem is
that if it's not, the custom validator error text doesn't appear. Why is
that?

-Darrel
Mar 19 '07 #2
this is what validation group names are for. put the button and the text
validator in the same group.
Where/how does one do this? I don't see a group name property. (I'm using
the 1.1 framework, btw...)

-Darrel
Mar 19 '07 #3
Where/how does one do this? I don't see a group name property. (I'm using
the 1.1 framework, btw...)
Ah. After some googling, that appears to be a asp.net 2.0 feature.

So, anyway to do this in 1.1 without just writing out my own error message
to screen? (Actually, perhaps that's the easiest solution at this point...)

-Darrel
Mar 19 '07 #4

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

Similar topics

3
7537
by: Lo?c Mah? | last post by:
Hello I try to use a Validator for a TxtCtrl placed in a Panel with a Button in order to trigger the Validator and test the content of TxtCtrl. I have looked into wxPython documentation and demo and searched in google, but I am still unsuccessful yet. My problem is that I do not manage to call the Validate() method of my Validator from the button handler.
6
21320
by: Paul | last post by:
I am trying to setup a field validator and tried using the control to validate set to a dropdown list box but did not seem to work. Is there anyway to set this up or do you need to use client side validation? Thanks -- Paul G Software engineer.
4
16751
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.
5
3063
by: Helen | last post by:
Hi I'm using ASP.NET's standard validators to display error messages when people don't fill in required fields on my form. The error messages currently show as soon as the form is loaded, but what I'd really like is for the error messages to only be displayed after the validation fails. Is this a feature of the standard ASP.NET validation or will I have to write custom validators if I want to do that?
8
7828
by: pmud | last post by:
Hi, I am using a compare validator in asp.net application(c# code). This Custom validator is used for comparing a value enterd by the user against the primary key in the SQL database. IF the VALUE ENTERED BY THE USER EXISTS IN THE DB , then THE ERROR MESSAGE OF THE COMPARE VALIDATOR SHOULD BE DISPLAYED. For this, I used the reference artiicle "http://msdn.microsoft.com/library/default.asp?url=/library/en-...
1
2783
by: Elie Medeiros via .NET 247 | last post by:
Hi there, I have written a custom validator function to validate a datefrom a user-filled field. The function tries to parse the dateand if it can't, sets (serverValidateEventArgs)e.IsValid tofalse. The twist is that it allows blank dates to be entered - viz,e.IsValid==true if the field is left blank. The idea is to usethat validation control to make sure the date a user has enteredis valid, without the date field being required to...
3
9959
by: JerryK | last post by:
Hi, I have an ASP.net page, written in VB.net. In that code I want to access a validator web services that is secured via SSL. I have installed the certificate, via a .pfx file, on the system. I can browse to the service and appear to be getting through However, from my server page I cannot access the web service. The call to the service generates the exception "Request failed with HTTP status 403: Forbidden". I had previously...
2
1408
by: Howard | last post by:
Since validator controls use client side javascript to validate the input. Do I still need to validate user input at the server side? What if an attacker writes a custom script that doesn't require the use of an internet browser? Will he be able to skip the asp.net validator controls? Thanks, Howard
0
858
by: Darrel | last post by:
I have a text box that I have a custom validator attached to. I then have an image button that is set to NOT cause validation (as there are other validators on the page I don't want triggered). The event handler for my imageButton is set up to validate the text box: ------------- textbox.validate if textbox.isvalid then...
0
9152
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
9016
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
8856
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
7709
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...
0
5858
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
4360
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...
0
4613
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3037
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
2321
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.