473,651 Members | 2,742 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2188
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****@herplac e.com> ha scritto nel messaggio
news:UZ******** ************@ea tel.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='javas cript'>
<!--
function MyFunction(sour ce, 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 .ClientValidati onFunction.

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. "Profession al 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 MultiConditionV alidator. 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****@PeterBlu m.com
Creator of "Profession al Validation And More" at
http://www.peterblum.com/vam/home.aspx

"Lisa Calla" <sp****@herplac e.com> wrote in message
news:UZ******** ************@ea tel.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.in fo> wrote in message
news:eH******** ******@TK2MSFTN GP14.phx.gbl...
The idea is to create a javascript function that looks like this:

<script language='javas cript'>
<!--
function MyFunction(sour ce, 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 .ClientValidati onFunction.

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. "Profession al 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 MultiConditionV alidator. 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****@PeterBlu m.com
Creator of "Profession al Validation And More" at
http://www.peterblum.com/vam/home.aspx

"Lisa Calla" <sp****@herplac e.com> wrote in message
news:UZ******** ************@ea tel.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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
3046
by: Sue | last post by:
I have a datagrid populated with 6 visible read-only labels and several hidden fields. Below the datagrid, I have a table with various textboxes, dropdowns, etc. I've managed to decypher the client-side coding needed for the user to click a "select" button (HTMLButton) in column 0 of the datagrid and have the table objects auto-fill with corresponding values from the dataset row in the datagrid without making a roundtrip to the server. ...
1
1488
by: Zoe Hart | last post by:
I know that I can use a control's Attributes collection to specify client-side event handlers. I want to add a simple javascript function to pop up a confirmation message for a command button. The problem is that the page uses several client-side field validators so ASP.NET is already using the control's onClick event to call the validation logic. Is it possible to have a custom client-side handler when you're using the validator controls?...
0
1460
by: Ron | last post by:
I've an aspx page with a custom (composite) server control and a TextBox, both with RequiredFieldValidators. I'd like the custom control to behave the same way the default TextBox does when one clicks the submit button - a trip to the server is *not* made when using Internet Explorer. Validation works for the custom control, but only after a trip to the server. Does anyone know why this is the case and if there is a way to force...
1
1295
by: Vi | last post by:
I have a web form that is submitted using an <asp:Button> control. On this form I want to do some client side validation using the onsubmit event of the form (client side). In order to do that I'm trying to attach to the Form the onsubmit attribute, so that the client side code looks like this: <FORM NAME="oDoSubmit" onsubmit="return(myOnSubmitEventHandler());"> </FORM> But I can't do that, because I don't know how to access the Form...
9
2219
by: AFN | last post by:
I was just dropped into someone else's code (isn't that always so fun?). I can't figure out why a custom validation control's server event function is executing. There is nothing (that I see) in page_load, or elsewhere, that says page.validate, no control says "causesvalidation=true", and the AutoEventWireup is set to false. So I would think that the control's server event function would NOT execute, but it does execute right after...
2
1896
by: Andre | last post by:
I've set up a CustomValidator control which has both a client side and server side function associated with it. My server side function never seems to be called as long as I have the "EnableClientScript" property set to true. As soon as I set this property to false , my server side function is called and works fine. From reading the help, it was my understanding that the server side function should be called even if I have a client side...
2
1789
by: Alan Silver | last post by:
Hello, I have a custom validator on my page, and have the server-side code working fine. I want to add a client-side funtion as well, but am not sure how to wire it in so that it works with the other validators on the page. I specified the name of the Javascript function with the ClientValidationFunction attribute of the custom validator, and it is being called fine. However, if the validator returns false (ie bad
1
1480
by: drop | last post by:
Hi, I'm using a Composite Date Control that I want to be able to validate Client-Side with the ASP RegularExpression Validator. I want the validator to be outside of the Composite Control so I can easily move it around. Right now, I can make Server-Side validation by using ValidationPropertyAttribute. The problem is i can't seem to make it work Client-Side.
2
1116
by: Jordan S. | last post by:
I'm experimenting with dynamically inserting custom composite Web server controls onto a page. For testing purposes I have two custom composite Web server controls that each have a couple of TextBox controls and a "submit" button, as well as required field validators for each of the textboxes. What I'm finding is that when both of these Web server controls appearon the page, clicking on the "submit" button of either of the controls causes...
0
8357
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8277
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8700
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8465
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8581
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7298
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
2701
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 we have to send another system
1
1910
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1588
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.