Hello everyone. I am trying to apply validation rules on a dynamicaly created textbox. I need to validated time enterted by the user. (7:00pm, 6pm, 12am) ect. What im doing bellow is comparing the string start_time to the ValidationExpression, and if it is not same, then the inputted string is not in the correct format. The IF statement is not working. Not sure if I'm going about this the correct way or if my syntax is slightly off. Can anyone help?
TextBox textbox1 = (TextBox)Wizard1.FindControl("txtbox" + v.ToString());
string array_date = mydates[i].ToString();
string start_time = textbox1.Text.ToString();
RegularExpressionValidator regex = new RegularExpressionValidator();
regex.ID = "regex" + v.ToString(); ...
Go to the complete details ...