473,473 Members | 1,831 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Using Summary Validation control with server Custom validation

I setup some standard Required Field Validation controls and one Custom
validation control on an ASP.NET page (within a user control) to validate
text entry. I also setup a Summary Control to post all the messages to a
message box (ShowMessageBox=true). The required field validation error
messages show up in the summary just fine but I can't get the custom
validation message to show up if invalid.

So far I have the summary control showing the required field errors and the
custom validation message shows inline. In order to get that to work, I had
to add code to my button control to not redirect to other page if
page.isvalid = false. Is there anyway to get it to show up on the message
box? Does it have anything to do with the fact that the messagebox is client
side and the custom validation control is doing server side validation?

Thanks,
Barbara Alderton
Nov 18 '05 #1
2 3703
The alert box shown is a client-side feature that appears prior to posting
back. Your customvalidator most likely does not have any client-side code.
So it cannot contribute to the client-side message box. If you can, write
client-side code for your customvalidator. Otherwise, you will have to live
with this design.

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

"Barbara Alderton" <Ba*************@discussions.microsoft.com> wrote in
message news:B9**********************************@microsof t.com...
I setup some standard Required Field Validation controls and one Custom
validation control on an ASP.NET page (within a user control) to validate
text entry. I also setup a Summary Control to post all the messages to a
message box (ShowMessageBox=true). The required field validation error
messages show up in the summary just fine but I can't get the custom
validation message to show up if invalid.

So far I have the summary control showing the required field errors and
the
custom validation message shows inline. In order to get that to work, I
had
to add code to my button control to not redirect to other page if
page.isvalid = false. Is there anyway to get it to show up on the message
box? Does it have anything to do with the fact that the messagebox is
client
side and the custom validation control is doing server side validation?

Thanks,
Barbara Alderton

Nov 18 '05 #2
Thanks for your quick response. I am using server side code because it needs
to validate the entry against Active Directory on the server. This can't be
done from client side as far as I know.

I have read numerous articles on validation controls and it is never
mentioned that the message box cannot be used for custom validation controls
that don't use client-side code but I did suspect that was the case since
message box is a client-side feature. I guess I'll have to live with the
design I'm using know.

Thanks again,
Barbara Alderton

"Peter Blum" wrote:
The alert box shown is a client-side feature that appears prior to posting
back. Your customvalidator most likely does not have any client-side code.
So it cannot contribute to the client-side message box. If you can, write
client-side code for your customvalidator. Otherwise, you will have to live
with this design.

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

"Barbara Alderton" <Ba*************@discussions.microsoft.com> wrote in
message news:B9**********************************@microsof t.com...
I setup some standard Required Field Validation controls and one Custom
validation control on an ASP.NET page (within a user control) to validate
text entry. I also setup a Summary Control to post all the messages to a
message box (ShowMessageBox=true). The required field validation error
messages show up in the summary just fine but I can't get the custom
validation message to show up if invalid.

So far I have the summary control showing the required field errors and
the
custom validation message shows inline. In order to get that to work, I
had
to add code to my button control to not redirect to other page if
page.isvalid = false. Is there anyway to get it to show up on the message
box? Does it have anything to do with the fact that the messagebox is
client
side and the custom validation control is doing server side validation?

Thanks,
Barbara Alderton


Nov 18 '05 #3

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

Similar topics

4
by: Kevin Phifer | last post by:
Ok, before anyone freaks out, I have a solution I need to create that gathers content from maybe different places. Each one can return a <form> in the html, so its the classic can't have more than...
5
by: Marcel Gelijk | last post by:
Hi, I am trying to create a User Control that is located in a seperate class library. The User Control contains a textbox and a button. The page generates an exception when it tries to access...
2
by: NWx | last post by:
Hi, I have a form with few controls, few validation controls and a validation summary control I set-up appropriate Messages in Validations controls. However, if validation fails, I just want...
2
by: Stephen Miller | last post by:
Can the CustomValidator be used to simply report unexpected errors, without requiring Client/Server validation? To explain, say you had a simple text box and button that did a Full-text Search of a...
2
by: Lucas Tam | last post by:
Hi all, I want to display an error message from a custom validator in my Validation Summary control. Do I need to build the ServerValidate Event handler in order to display an error...
2
by: nmakhan | last post by:
I have a validation summary that I use soley for my Required Field Validators. That works fine if I do things that way up to a point, if by chance the validation summary says "Date field...
4
by: kpg | last post by:
I can't get the CustomValidator (CV) ErrorMessage to display in the ValidationSummary. On the same page I have several RequiredField Validators and a Range Validator, that all work just fine,...
1
by: daveh551 | last post by:
I have a web page with an address entry form and some other things on it. The form has field validators on several of the fields, and a validation summary at the bottom. Because of the size of...
0
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...
0
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...
1
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...
1
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...
0
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...
0
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...
0
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 ...
1
muto222
php
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.