c# - Access control in a number of tags from codebehind -


i've such 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 access fileupload control in codebehind? if there's no , it's simple e.g. upfile.filename if it's in tags ther's error:

the name 'upfile' not exist in current context 

how change it?

i don't know how layouttemplate works, can try this:

fileupload upfile = (fileupload)logincontrol.findcontrol("upfile"); 

Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -