I have a regular expression like below what my goal when user changed dropdown country in that ddl country selected index depending on the country i have setted VatRegularExpression = sp.CountryVatRegularExpressionGet(ddlCountry.SelectedValue) ---here i am getting regular expression from database If Not String.IsNullOrEmpty(VatRegularExpression) Then RegtxtVatCode.Enabled = True RegtxtVatCode.ValidationExpression = VatRegularExpression End If <asp:RegularExpressionValidator ID="RegtxtVatCode" Enabled="false" runat="server" ControlToValidate="txtVatCode" Display="Dynamic" CssClass="help-block" ErrorMessage="<%$ Resources: res, WrongVatCode %>"> </asp:RegularExpressionValidator> But my problem is when there is no VatRegularExpression value. for example when i select country germany there is no regular expression for this country.then also still it is giving the error message but it should not give the error message.Can you help me out please
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)