Access masterpage control in contentpage codebehind
-
I have a masterpage called CaseManagement.Master and a content page called AppointmentSchedule. On my master page I have a textbox called txtPolicyNumber. How do I access this textbox from the content page's codebehind? "this.txtPolicyNumber" and "this.Master.txtPolicyNumber" doesn't work.
-
I have a masterpage called CaseManagement.Master and a content page called AppointmentSchedule. On my master page I have a textbox called txtPolicyNumber. How do I access this textbox from the content page's codebehind? "this.txtPolicyNumber" and "this.Master.txtPolicyNumber" doesn't work.
you acn access controls of master page like this
TextBox tb = (TextBox)Master.FindControl("txtPolicyNumber");
Cheers!! Brij Check my latest Article :A walkthrough to Application State
-
I have a masterpage called CaseManagement.Master and a content page called AppointmentSchedule. On my master page I have a textbox called txtPolicyNumber. How do I access this textbox from the content page's codebehind? "this.txtPolicyNumber" and "this.Master.txtPolicyNumber" doesn't work.