471,122 Members | 848 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,122 software developers and data experts.

client side validation for custom composite control

Hi,
I've been struggling with this for a few days. I've seen bits and pieces
(how to set up custom validation), but I can't seem to understand how to get
client side validation for my custom composite control (the textbox part).
I've done a ton of vbnet, am new to aspnet, but barely know how to spell
java. Anyone know of a good website or tutorial for this kind of thing?

TIA
Nov 18 '05 #1
3 2045
I suggest you to use reflector (a disassembler for dotnet).
It permit to study microsoft controls code.
I tink it's the best way.

http://www.aisto.com/roeder/dotnet/

"Lisa Calla" <sp****@herplace.com> ha scritto nel messaggio
news:UZ********************@eatel.net...
Hi,
I've been struggling with this for a few days. I've seen bits and pieces
(how to set up custom validation), but I can't seem to understand how to
get client side validation for my custom composite control (the textbox
part). I've done a ton of vbnet, am new to aspnet, but barely know how to
spell java. Anyone know of a good website or tutorial for this kind of
thing?

TIA

Nov 18 '05 #2
The idea is to create a javascript function that looks like this:

<script language='javascript'>
<!--
function MyFunction(source, args)
{
// write javascript logic that determines if there is a error
// set args.IsValid to true or false depending on if there is an error
}
-->
</script>

Assign the function name to the CustomValidator.ClientValidationFunction.

The hard part is figuring out the javascript logic. You will need to specify
the exact goals and related elements on the page for anyone to help with
that.

FYI: I built a replacement to Microsoft's validators that helps avoid most
client-side scripting issues. "Professional Validation And More"
(http://www.peterblum.com/vam/home.aspx) includes 22 validators, all with
client-side support on many more browsers than Microsoft's supports. One of
the most powerful validators is the MultiConditionValidator. Use it to
combine the power of any of the validators in boolean expressions like
[TextBox1 is required and TextBox2 is required and TextBox2 must be a valid
date format].

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

"Lisa Calla" <sp****@herplace.com> wrote in message
news:UZ********************@eatel.net...
Hi,
I've been struggling with this for a few days. I've seen bits and pieces
(how to set up custom validation), but I can't seem to understand how to
get client side validation for my custom composite control (the textbox
part). I've done a ton of vbnet, am new to aspnet, but barely know how to
spell java. Anyone know of a good website or tutorial for this kind of
thing?

TIA

Nov 18 '05 #3
Thanks for your help!

"Peter Blum" <PL****@Blum.info> wrote in message
news:eH**************@TK2MSFTNGP14.phx.gbl...
The idea is to create a javascript function that looks like this:

<script language='javascript'>
<!--
function MyFunction(source, args)
{
// write javascript logic that determines if there is a error
// set args.IsValid to true or false depending on if there is an error
}
-->
</script>

Assign the function name to the CustomValidator.ClientValidationFunction.

The hard part is figuring out the javascript logic. You will need to
specify the exact goals and related elements on the page for anyone to
help with that.

FYI: I built a replacement to Microsoft's validators that helps avoid most
client-side scripting issues. "Professional Validation And More"
(http://www.peterblum.com/vam/home.aspx) includes 22 validators, all with
client-side support on many more browsers than Microsoft's supports. One
of the most powerful validators is the MultiConditionValidator. Use it to
combine the power of any of the validators in boolean expressions like
[TextBox1 is required and TextBox2 is required and TextBox2 must be a
valid date format].

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

"Lisa Calla" <sp****@herplace.com> wrote in message
news:UZ********************@eatel.net...
Hi,
I've been struggling with this for a few days. I've seen bits and pieces
(how to set up custom validation), but I can't seem to understand how to
get client side validation for my custom composite control (the textbox
part). I've done a ton of vbnet, am new to aspnet, but barely know how to
spell java. Anyone know of a good website or tutorial for this kind of
thing?

TIA


Nov 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Vi | last post: by
1 post views Thread by drop | last post: by

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.