473,396 Members | 1,779 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,396 software developers and data experts.

ValidationSummary - error message in reponse to exception

mg
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' ?
Nov 18 '05 #1
2 2197
The ValidationSummary only shows the errors from validators. It doesn't
appear unless at least one validator has its IsValid property set to false.

So create a custom validator whose server side evaluation function
determines these issues and sets ErrorMessage to the text that you want to
say. You can also set the IsValid and ErrorMessage properties manually after
the validation function runs, such as in response to catching an exception
or running if/else.

--- Peter Blum
www.PeterBlum.com
Email: PL****@PeterBlum.com
Creator of "Professional Validation And More" at
http://www.peterblum.com/vam/home.aspx

"mg" <mg@theworld.com> wrote in message
news:93**********************************@microsof t.com...
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' ?
Nov 18 '05 #2
The ValidationSummary only shows the errors from validators. It doesn't
appear unless at least one validator has its IsValid property set to false.

So create a custom validator whose server side evaluation function
determines these issues and sets ErrorMessage to the text that you want to
say. You can also set the IsValid and ErrorMessage properties manually after
the validation function runs, such as in response to catching an exception
or running if/else.

--- Peter Blum
www.PeterBlum.com
Email: PL****@PeterBlum.com
Creator of "Professional Validation And More" at
http://www.peterblum.com/vam/home.aspx

"mg" <mg@theworld.com> wrote in message
news:93**********************************@microsof t.com...
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' ?
Nov 18 '05 #3

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

Similar topics

0
by: newusertodotnet | last post by:
I'm trying to add a ValidationSummary control to a common base page used by all of our system's aspx/ascx files. The base page is a regular class file that inherits from System.Web.UI.Page. When I...
3
by: Christer | last post by:
Hi all! I recently created a MessageBox webcontrol for asp.net. This can be used as is, but I also want to take ude of it in other webcontrols. Right now i creating a ValidationSummary control,...
1
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' ?
2
by: Sunil Sabir | last post by:
Dear All, I am using ValidationSummary,RequiredField Validator and Regular Expression Validator in my ASP.net form. I want to display error messages only in the ValidationSummary Control. But...
1
by: Dan Sikorsky | last post by:
I'm using SmartNavigation and need to automatically scroll to the top of the page when the ValidationSummary control catches errors and displays them, so that the user can see the errors without...
5
by: john.livermore | last post by:
I am successfully using the client side validation controls, but there are a couple aspects of their behavior that I wish to modify. I cannot see how to accomplish this through the properties, but...
1
by: Ken Varn | last post by:
If a page has multiple ValidationSummary controls, how does it distinguish which ValidationControls are associated with which ValidationSummary controls? The reason I am asking this is that I...
2
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...
2
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...
0
by: =?Utf-8?B?QW1pciBUb2hpZGk=?= | last post by:
Hi Is it possible to get the ValidationSummary control to display its errors on the client side i.e. before a submit of the form has happened? My problem is that my ValidationSummary displays...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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...
0
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,...

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.