开发者

asp.net checkbox and html checkbox

开发者 https://www.devze.com 2023-01-23 02:41 出处:网络
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

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" />
0

精彩评论

暂无评论...
验证码 换一张
取 消