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
Post a Comment