![]() |
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 |
Re: client side validation for custom composite control
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" <spamme@herplace.com> ha scritto nel messaggio news:UZ-dnQGuKr3jHeXcRVn-sg@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 > |
Re: client side validation for custom composite control
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: PLBlum@PeterBlum.com Creator of "Professional Validation And More" at http://www.peterblum.com/vam/home.aspx "Lisa Calla" <spamme@herplace.com> wrote in message news:UZ-dnQGuKr3jHeXcRVn-sg@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 > |
Re: client side validation for custom composite control
Thanks for your help!
"Peter Blum" <PLBlum@Blum.info> wrote in message news:eH8iXnFuEHA.3200@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: PLBlum@PeterBlum.com > Creator of "Professional Validation And More" at > http://www.peterblum.com/vam/home.aspx > > "Lisa Calla" <spamme@herplace.com> wrote in message > news:UZ-dnQGuKr3jHeXcRVn-sg@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 >> > > |
| All times are GMT. The time now is 10:24 AM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.