I've such a structure
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
<asp:Login ID="LoginControl" runat="server" onauthenticate="LoginControl_Authenticate" >
<LayoutTemplate>
<table>
<tr>
<td>
<asp:UploadFile ID="upFile"...
<td>
<asp:Button ID="LoginButton" onclick="LoginButton_Click"...
How get access to FileUpload control in codebehind? If there's no and it's simple e.g. upFile.FileName But if it's in this tags ther's error:
The name 'upFile' does not exist in the current context
How to change it?
I don't know how that LayoutTemplate
works, but you can try this:
FileUpload upFile = (FileUpload)LoginControl.FindControl("upFile");