473,698 Members | 1,883 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Using Validators to validate UserControls

I have a UserControl that contains Controls I want to validate. I am
attempting to write a class that inherits BaseValidator (which I have done
many times before for the standard controls such as TextBox) to do this
validation. I have added properties to my UserControl that make the
properties necessary to do validation available, so everything I need is
available once i have access to the UserControl. However, I am having
trouble doing this. Could somebody either direct me to a site that helps
with creating validators for UserControls (and other controls not supported
by the Validators by default), or maybe give me an example? Thanks.

Nathan Sokalski
nj********@hotm ail.com
http://www.nathansokalski.com/
Sep 5 '08 #1
0 877

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

Similar topics

1
2017
by: Tom Pearson | last post by:
I create controls and validators dynamically dependent on data at runtime. I create the control then the relevant validator(s) for it assigning the Control.ID as the control to validate. These controls and validators are then added to a table for display to the user. This code did seem to work originally, but now does not amd I am stumped as to why. There have been some code changes, but not to the methods below and I have pretty much...
0
1909
by: Tom Pearson | last post by:
I create controls and validators dynamically dependent on data at runtime. I create the control then the relevant validator(s) for it assigning the Control.ID as the control to validate. These controls and validators are then added to a table for display to the user. This code did seem to work originally, but now does not amd I am stumped as to why. There have been some code changes, but not to the methods below and I have pretty much...
7
1353
by: angus | last post by:
Dear all, I have 5 textboxes, and 2 buttons in a webform. 1-3 textboxes would be validated by 3 Required Field Validators if button 1 is click; 4-5 textboxes would be validated by 2 Required Field Validators if button 2 is click. I have found whether i click button 1 or button 2, textboxes 1-5 will be
4
4373
by: Fernando Lopes | last post by:
Hi. I have a page with a usercontrol. In this UC, I have two ListBoxes and two buttons. When i click in one button, i get the selected item in the listbox. How can i validate, using validators, if the selected listbox has a selected item? Thanks. Fernando
1
1354
by: psparago | last post by:
I have developed a tab user control in which each tab is itself a user control and the tab selection control is a datalist. Each tabbed user control has zero or more validator controls on it. The hosting page has a summary validator on it. Each tabbed user control is created dynamically on page_init (on both postback and not postback), but only the tabbed user control which corresponds to the selected tab is marked as visible. This has...
3
1936
by: rgparkins | last post by:
Hi I am currently having problems with Validators in a user control. I am creating a wizard sign-up process which have the allocated step (hyperlinks" at the top of the page. A user can also click next/previous. Dependant on the current step in the sign-up process I am loading a new user control as I dont want to have 7-8 pages, just one page and load the control dynamically. All is sweet at the moment apart from the validation...
7
1225
by: Adrian Parker | last post by:
Having a problem with validators. Because we want to only test whether the current field in a changed event is valid before we process the change code, I have tried to turn off all validators for the page (all ctrls are in a table), then just enable the one relevant validator, run the page.validate and then if valid, do the change code. otherwise, skip the change code and then finally enable all the validators again. What's happening...
0
1325
by: Ron Adam | last post by:
Sometimes it's good to check things while working on them. This seems like a good way to do that. You could probably put these in a module and just import them. from validators import * I'm interested if anyone can think of ways to improve this further.
1
3099
by: Andrew Jocelyn | last post by:
Hi I have a Formview control in a UserControl. The server-side validation is not working, i.e. the events are not firing when a button control which causes validation is fired or even when Page.Validate() is explicitly called. I'm loading the FormView as an IBindableTemplate as in this article but I don't think this is the reason for the validation not working. http://www.developerfusion.co.uk/show/4721/
0
8673
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
8601
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
8860
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
7716
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...
0
4365
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4614
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3043
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
2
2327
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1998
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.