Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 261
  • Last Modified:

vam:requiredtextvalidator how to enable it on codebehind?

vam:requiredtextvalidator how to enable it on codebehind?
i want to do it dynamicaly on the basis of a business logic. please help
0
x1877
Asked:
x1877
  • 2
1 Solution
 
Anurag ThakurTechnical ManagerCommented:
0
 
x1877Author Commented:
Thats a good site ragi0017 - Thanks
0
 
x1877Author Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now