Add CompareValidator And RequiredFieldValidator at run time
In My Edit page
private void Page_Load(object sender, System.EventArgs e)
{
//step 1 get data from database
//step 2 fill data which just got from database to TextBox Controls
this.COMPID.Text = TmpRow["COMPID"].ToString();
//Now if COMPID.Text != "" I want to add these ValidatorContrls to COMPID
//Add RequiredFieldValidator (avoid empty value)
//Add CompareValidator (COMPID.Text should Bigger Than Original value ( which get from Database -- TmpRow["COMPID"].ToString())
}
it's easy to add validator in design time.. how to add validator in run time?
thanks
...
Go to the complete details ...