Hi,
I am using regular expression validator to carry out some validation and have some code like this:
<asp:regularexpressionvalidator id="regMobileNo" ControlToValidate="txtMobileNo" ValidationExpression="[0-9]{10,15}"
In my aspx.cs page I have added the following line of code to pull my vale from the config, e.g. 4,6
String MobileValidation = ConfigurationSettings.AppSettings["MobileValidation"].ToString();
In the aspx file I want to refer to the variable to dynamically refernce this, e.g. replace 10,15 that is currently hard coded.
How do I do this?
Thanks
I am using regular expression validator to carry out some validation and have some code like this:
<asp:regularexpressionvalidator id="regMobileNo" ControlToValidate="txtMobileNo" ValidationExpression="[0-9]{10,15}"
In my aspx.cs page I have added the following line of code to pull my vale from the config, e.g. 4,6
String MobileValidation = ConfigurationSettings.AppSettings["MobileValidation"].ToString();
In the aspx file I want to refer to the variable to dynamically refernce this, e.g. replace 10,15 that is currently hard coded.
How do I do this?
Thanks