Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > "extract" info from ValidationSummary

Reply
Thread Tools

"extract" info from ValidationSummary

 
 
mg
Guest
Posts: n/a
 
      12-15-2003
Is it possible to "extract" the error messages from the
ValidationSummary in a WebForm. I'd like to use these
strings elsewhere.

If so, is there a [C#] code example of this?
 
Reply With Quote
 
 
 
 
Teemu Keiski
Guest
Posts: n/a
 
      12-16-2003
Hi,

why validation summary? Do you need to reuse the messages at client-side? At
server-side you can loop through Page.Validators collection and at
client-side through the validator references stored in Page_Validators array

<script language="javascript">
<!--
var Page_Validators = new Array(document.all["RequiredFieldValidator1"]);
// -->
</script>

You just need to dig the error messages by checking the isvalid property ig
yo8 want only the erroneus ones.
Certainly you could also just try to get the innerText of the client-side
element the ValidationSummary renders.

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist


"mg" <> wrote in message
news:084d01c3c33c$0c500250$...
> Is it possible to "extract" the error messages from the
> ValidationSummary in a WebForm. I'd like to use these
> strings elsewhere.
>
> If so, is there a [C#] code example of this?



 
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
ValidationSummary problem Mr. x ASP .Net 1 02-04-2004 03:20 AM
"extract" info from ValidationSummary mg ASP .Net 0 12-15-2003 02:52 PM
ValidationSummary NOT ok in Win XP ? mg ASP .Net 2 10-26-2003 02:12 PM
ValidationSummary ShowMessageBox HeaderText ? Gandalf ASP .Net 0 08-10-2003 06:35 PM
ValidationSummary Disappearing Act! John Mabbott ASP .Net 0 06-27-2003 03:51 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57