I am adding controls dynamically to PlaceHolder which within ContentPlaceHolder
var t = (ContentPlaceHolder)Master.FindControl("ContentPlaceHolder1");
var t1 = (PlaceHolder)mpContentPlaceHolder.FindControl("PlaceHolderName");
var t2 = (DropDownList)t1.FindControl("ControlID");
It looks like I am missing something because t2 is always null
If you want to find controls of master page then you can find like :
Label l = Master.FindControl("label1") as Label;
And in your case for finding control from contentplaceholder you can find control like :
TextBox TB=
Master.FindControl("ContentPlaceHolder1").FindControl("textbox1") as
TextBox;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With