Solved

vam:requiredtextvalidator how to enable it on codebehind?

Posted on 2008-10-14
3
253 Views
Last Modified: 2008-10-26
vam:requiredtextvalidator how to enable it on codebehind?
i want to do it dynamicaly on the basis of a business logic. please help
0
Comment
Question by:x1877
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 26

Expert Comment

by:Anurag Thakur
ID: 22752344
0
 

Author Comment

by:x1877
ID: 22770924
Thats a good site ragi0017 - Thanks
0
 

Accepted Solution

by:
x1877 earned 0 total points
ID: 22771022
This is the code i added to get this done

i set the enabled property to false on design time.

<vam:requiredtextvalidator enabled="false"


and added the following code on code behind. So it will enabled only if the businse case matches
RequiredTextValidator vldEditPrimaryDayPhoneRequired = ctlWorkflow.FindControl("vldEditPrimaryDayPhoneRequired") as RequiredTextValidator;
						vldEditPrimaryDayPhoneRequired.Enabled = true;
	vldEditPrimaryDayPhoneRequired.EnableClientScript = true;

Open in new window

0

Featured Post

Linux Academy Android App Now Supports Chromecast

We have some fantastic news for our Android fans. We’re so excited to announce that the Linux Academy Android app is now available with Chromecast support. That’s right – simply download the latest update of the Linux Academy App and start casting your favorite course videos!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

615 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question