asp.net - get fileupload id in code behind when the page inside masterpage -
I want to know how to get the fileupload control id when I have the entire contents of content in Placeholder 1 . I have FindControlRecursive (Control Route, String ID) method and I have called it like FindControlRecursive (contentplaceholder1, fileupload1), but its not working. So plz can give me some files how can I get fileupload1 id? >
You can MasterPage
control the FindControl
method to You can use the
. Secure Zero Page_load (Object Sender, System.EventArgs E) {ContentPlaceHolder Content = Page.Master.FindControl ("Content Placeholder 1") as ContentPlaceHolder; FileUpload fu = content.FindControl ("FileUpload1") as FileUpload; // ...} Content
page to control FileUpload
Comments
Post a Comment