473,698 Members | 2,576 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Inject items in ValidationSumma ry control?

First, a little background. I'm trying to forge ahead into ASP.NET 2.0.
I've dome many assemblies in C#, but I've yet to have to use ASP.NET.
I'm trying to forge ahead in getting some web/server controls created so
during a future conversion the work is already done for other programmers.

I've started created common controls used in various ecommerce
checkouts. For example, credit card validation, promo vcodes validation,
etc. Some sites use both, some sites use one. In ever case, they all
just do the right thing because their validation error messages go into
a ValidationSumma ry control. This is all well and good for server side
validation.

However, even if the server side validates user input, the backend
systems may still throw up errors about the data the user entered...like
the promo code has expired, the credit card is a private lable and has
options, etc, etc.
What I would like to do is inject those returned errors back into the
ValidationSumma ry component since they will be displayed the same way,
and the Page.IsValid would be True at that point. I have no clue where
to begin with such a task and am looking for pointers to the approach.

There could be in excess of 20 errors returned, so I didn't want to
create local validators that simply checked the return codes.

Any ideas?

Thanks,
-=Chris
Jul 25 '05 #1
3 1738
Jan
use a System.Web.UI.W ebControls.Cust omValidator and place your server
side validation code in the ServerValidate handler.

The client side validation checks will all be done first and if they
all pass the page will post back at which point the CustomValidator s
will be run.

Hope that helps,

Jan

Jul 25 '05 #2
Jan wrote:
use a System.Web.UI.W ebControls.Cust omValidator and place your server
side validation code in the ServerValidate handler.

The client side validation checks will all be done first and if they
all pass the page will post back at which point the CustomValidator s
will be run.

Hope that helps,

Jan

I'm already using CustomValidator s. The problem is, if I use 1
CustomValidator to validate data with the backend system, I need to
stuff many different ErrorMessages into the ValidationSumma ry, not just
the single ErrorMessage for that CustomValidator . Even if I stuff
multiple LI HTML into the ErrorMessage property, it gets wrapped in a
single LI during Render.

-=Chris
Jul 25 '05 #3
Jan
Ah I see,

Well just create a class with a static boolean attribute that stores
it's data in Session[...] like ValidationFaile d.

When you start processing the serverside validators set it false;
Then set it true if a custom validator fails.
And make sure that each validator only runs if ValidationFaile d is
false

Hope that helps

Jul 26 '05 #4

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

Similar topics

0
378
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 debug the application and click the submit button with a data element that fails a validation, I get the correct ValidationSummary messageBox, but I then receive the following error in WebUIValidation.js ValidationSummaryOnSubmit(): Microsoft...
0
1989
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
3
4958
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, that makes use of my messagebox to show the summary of failing validators. So far I've been successfull achieving this. However, the serverside nature of the MessageBox currently forces all validators (and the validationsummary) to have...
2
2429
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 when I run the form the messages are displayed ValidationSummary,RequiredField Validator and Regular Expression Validator together . Is it possible that the message is displayed only in ValidationSummary control and not in RequiredFieldValidator...
5
3677
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 I thought I would ask here for advice. - ValidationSummary When there are validation errors on the page, the summary control displays its HeaderText at the top of my form. However, it lists each validation problem. Additionally each error...
1
3912
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 want to display a Message Box for the validation message on my Validation controls. My validation control is embedded within a custom server control. If my custom server control adds a ValidationSummary control, I am afraid that it may conflict...
3
306
by: Christopher H. Laco | last post by:
First, a little background. I'm trying to forge ahead into ASP.NET 2.0. I've dome many assemblies in C#, but I've yet to have to use ASP.NET. I'm trying to forge ahead in getting some web/server controls created so during a future conversion the work is already done for other programmers. I've started created common controls used in various ecommerce checkouts. For example, credit card validation, promo vcodes validation, etc. Some sites...
2
6282
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
2
1800
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
8609
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
9169
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
9030
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
7738
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
5861
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
4622
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3052
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
2335
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2007
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.