473,405 Members | 2,187 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.

Dynamic Wizard with Dynamic Validation Controls

All, I have searched all around and have not yet found the answer to this nor
a solution. Hopfully it will be easy to overcome.

Here is what I am trying to do:

I'm trying to build a wizard form completely dynamic. I'm adding the
labels, textboxes, drop downs, radio buttons, etc dynamically. I am able to
add them via Page Init. Which seems to re-add every time a button or post
back is initiated. Don't know if this is the problem.

Continuing, some of the data entry or selection controls need validation. I
add a CompareFieldValidator and point all the attributes to a certain drop
down to make sure the value is Not Equal to 'Select'. I have tested this
exact validator and control in static form and this works. I've tried to
play with the other elements in the validation control configuration
properties to see if the outcome changes and nothing.

Here is the code that generates the control:

CompareFieldValidatorControl = New System.Web.UI.WebControls.CompareValidator
CompareFieldValidatorControl.ID = "rv" & ControlID
CompareFieldValidatorControl.CssClass = "formError"
CompareFieldValidatorControl.ControlToValidate = ControlID
CompareFieldValidatorControl.Operator =
ErrorHandling.ErrorMessageOperator
CompareFieldValidatorControl.ValueToCompare =
ErrorHandling.ErrorValuetoCompare
CompareFieldValidatorControl.ErrorMessage =
ErrorHandling.ErrorMessage
CompareFieldValidatorControl.Enabled = True
CompareFieldValidatorControl.EnableClientScript = True
CompareFieldValidatorControl.Display = ValidatorDisplay.Dynamic
CompareFieldValidatorControl.ToolTip = "Correct the error before
proceeding"
...Control is added to page...

I see the code that is supposed to handle the validation but the validation
does not fail. When I click the 'Next' button the next page is built as it
should, but with no validation failure. That is the problem.

I tried to go another route and I cannot yet seem to figure out how to do
this:

I tried to construct code to read each of the controls in the dynamic Wizard
for a certain step and I cannot figure out how to do that. What I would like
to do is be able to read a Typeof control of TextBox, DropDownList, and
RadioButton List. What is the syntax or code to loop through the Wizard
step's controls for a specific step?

Any help would be greatly appreciated. Thanks!


--
Steve Funk
Application Developer
iHomeowners, Inc.
Oct 13 '06 #1
0 1527

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

Similar topics

1
by: Nathan Bloomfield | last post by:
Does anyone know if there is any documentation which relates to Access2k + ? or can anyone help adjust the code? I am having trouble converting the DAO references. TITLE :INF: How to...
1
by: Mike George | last post by:
I am having a problem with dynamic validation controls. I have some code that uses an XSLT to transform an XMLDocument into HTML which creates ASP.NET validation controls dynamically (v 1.1). ...
1
by: sleigh | last post by:
Hello, I'm building a web application that will build a dynamic form based upon questions in a database. This form will have several different sections that consist of a panel containing one to...
6
by: dhnriverside | last post by:
Hi peeps, I'm trying to create some controls textboxes at runtime, based on the number of items in a IETreeView that are checked. That I can do, I've got a place holder and I can create the...
2
by: geodev | last post by:
Hello, I’m currently writing an asp.net application that will be running on a Windows XP Professional workstation utilising IIS and MSDE Database. At a later date this application will need to...
1
by: Kum | last post by:
Hi, I need help in asp.net dynamic textbox controls validation. I am creating textbox controls dynamically on a asp.net webpage. Now after creating the textboxes on the page I want to validate...
3
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...
1
by: Elliot Rodriguez | last post by:
I have a dropdown list that defines the number of textboxes that appear within a particular panel. The boxes are created when the dropdownlist's SelectedIndexChanged event fires on postback. ...
0
by: Eniac | last post by:
Hi, I've been working on a custom user control that needs to be modified and the validation is causing me headaches. The control used to generate a table of 4 rows x 7 columns to display all...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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...
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,...

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.