Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Using Summary Validation control with server Custom validation

Reply
Thread Tools

Using Summary Validation control with server Custom validation

 
 
=?Utf-8?B?QmFyYmFyYSBBbGRlcnRvbg==?=
Guest
Posts: n/a
 
      10-15-2004
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
 
Reply With Quote
 
 
 
 
Peter Blum
Guest
Posts: n/a
 
      10-15-2004
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: http://www.velocityreviews.com/forums/(E-Mail Removed)
Creator of "Professional Validation And More" at
http://www.peterblum.com/vam/home.aspx

"Barbara Alderton" <(E-Mail Removed)> wrote in
message news:(E-Mail Removed)...
>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



 
Reply With Quote
 
 
 
 
=?Utf-8?B?QmFyYmFyYSBBbGRlcnRvbg==?=
Guest
Posts: n/a
 
      10-15-2004
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: (E-Mail Removed)
> Creator of "Professional Validation And More" at
> http://www.peterblum.com/vam/home.aspx
>
> "Barbara Alderton" <(E-Mail Removed)> wrote in
> message news:(E-Mail Removed)...
> >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

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Regarding validation summary control in asp:MultiView control iHavAQuestion ASP .Net 0 04-28-2008 05:45 PM
Custom Validation Summary Problem kpg ASP .Net 4 12-15-2006 10:21 PM
Displaying a Validation Error in a Validation Summary Control Lucas Tam ASP .Net 2 02-26-2004 07:49 PM
ControlDesigner not invoked on custom control when control is rendered within another custom control Matt Sokol ASP .Net Building Controls 2 08-07-2003 07:13 AM
Re: only custom validation control does server side validation? Colin Mackay ASP .Net 0 06-25-2003 07:54 AM



Advertisments