How to access hidden field from usercontrol
I have a hidden variable in my aspx page i.e mainpage.aspx
<asp:HiddenField runat="server" id="hdnCommonvCode" />
mainpage.aspx contains开发者_如何学JAVA tabcontainer control. On each tab an usercontrol is added. If i try to access this hidden field alert($find("<%=hdnCommonvasCode.ClientID %>"));
from usercontrol it shows compiler error msg
Compiler Error Message: CS0103: The name 'hdnCommonvCode' does not exist in the current context
Did you tried like this var hidx = document.getElementById('hdnCommonvCode');
精彩评论