473,405 Members | 2,349 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Clientside Validation in UserControls

I have a user control that contains several requiredFieldValidators. The
page the control sits in has other RequiredFieldValidators. On submitting
the form all the validators on the page fire and correctly validate. The
validators in the control seem to validate but do not return true/IsValid as
so my form is not submitted.

I would like to do this ClientSide, the only resolution I can find is to
perform the validation for the usercontrol Server Side, but this has
implications with the a password textbox which will (rightly) not retain
viewstate over a postback. Is there something that I need to set in my user
control to allow clientside validation?

TIA

MattC
Nov 19 '05 #1
1 1480
It sounds like you have two groups of controls that have separate submit
buttons which should fire their own validators. ASP.NET 1.x doesn't handle
this case without using server side validation. ASP.NET 2.0 introduces
Validation Groups, which lets you assign a group name to the submit control
and the validators it fires. My Professional Validation And More
(http://www.peterblum.com/vam/home.aspx), which works with ASP.NET 1.x, also
includes Validation Groups in its 25 validators.

These are the solutions if you trying to keep client-side validation active.

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

"MattC" <m@m.com> wrote in message
news:Oz**************@TK2MSFTNGP10.phx.gbl...
I have a user control that contains several requiredFieldValidators. The
page the control sits in has other RequiredFieldValidators. On submitting
the form all the validators on the page fire and correctly validate. The
validators in the control seem to validate but do not return true/IsValid
as
so my form is not submitted.

I would like to do this ClientSide, the only resolution I can find is to
perform the validation for the usercontrol Server Side, but this has
implications with the a password textbox which will (rightly) not retain
viewstate over a postback. Is there something that I need to set in my
user
control to allow clientside validation?

TIA

MattC

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Niclas Lindblom | last post by:
Hi, I have a datagrid with linkbuttons. I would like to catch the click event when a link button has been clicked and use the string from the text value of the link button in a clientside Java...
4
by: TJS | last post by:
how do I get "onSubmit" to work in .net ? <Form id="Form1" name="Form1" method="post" onSubmit="return validateStandard(this, 'error');" runat="server">
2
by: Eric Maia | last post by:
I have two UserControls I am using in a form. These are each also used separately in two other forms. The structure is essentially this: CourseUserControl.ascx - select or enter a course...
1
by: Paul | last post by:
Hi Guys and Girls I am trying to disable the clientside validation (Required Fields) by using the ValidatorEnable(id,false), which works find from the point of view that the client side script...
1
by: Kris | last post by:
Hi, I have a DataGrid where in each row has couple of text boxes and an update button. Each row is dynamically generated as the number of rows are not known ahead of time. When the user clicks the...
1
by: IkBenHet | last post by:
Hello, Currently I am using a large input form on a website that is based on ASP and JavaScript. Depending on the values that are filled in by the user the forms does a refresh and makes...
0
by: koen | last post by:
Hi! In asp.net (version 1.1) I run into a problem when trying to perform client validation. The error I get on the client-side is : "Error: expected ';'". This problem occurs when I place a...
3
by: Jon Paal | last post by:
using VWD and asp.net 2.0 how do I enable clientside validation in ligin control ? Following code does not produce popup alerts or red asterisks . ==================== <div id="content">...
7
by: mc | last post by:
I've not been able to get a Check box to client side validated on postback. with my changes I can get it to work on the serverside ok but not on the client. I have created a new control as...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.