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 Content page to control FileUpload . 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; // ...}


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

jquery - SimpleModal Confirm fails to submit form -

php - Multiple Select with Explode: only returns the word "Array" -