asp.net checkbox and html checkbox
There is one html checkbox whose id is"notice". in the code behind file i hv to use it.How should i declare it ?i hv written this but it is showing error that notice does not exi开发者_StackOverflow中文版st in the current context.
notifying = ((notice.Checked) ? 1 : 0);
when i m using asp.net checkbox it is not showing any errror. why? Also, I hv written one jquery function which is working fine with html checkbox but not working with asp.net checkbox. where is the problem.where i m doing wrong?
Did you try runat="server"
?
<input id="notice" type="checkbox" name="notice" runat="server" />
There is one html checkbox whose id is"notice". in the code behind file i hv to use it.Blockquote
Make sure that any "html" controls you need to address at the server have a
runat="server"
inside of them. a la:
<input id="notice" type="checkbox" runat="server" />
精彩评论