Hi,
Please check this code and let me know if it helps..
FrontMaster fm = new FrontMaster();
Content c=(Content)fm.FindControl("Content1");
TextBox txt1 = (TextBox)c.FindControl("txt1");
txt1.Attributes.Add("key", "YOUR SCRIPT GOES HERE...");
FrontMaster is your master page,Content1 is asp content control where the textbox resides and txt1 is textbox which needs to be validated...
Savan
|