Solved

vam:requiredtextvalidator how to enable it on codebehind?

Posted on 2008-10-14
3
249 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
  • 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

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

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

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…

856 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