'txtName' is not declared. It may be inaccessible due to its protection level

后端 未结 13 1588
暖寄归人
暖寄归人 2020-12-15 19:22

After putting a textbox on my page when I compile it I get the above error:

\'txtName\' is not declared. It may be inaccessible due to its protection level.

13条回答
  •  抹茶落季
    2020-12-15 20:00

    I got this issue, by removing runat="server" attribute from a div, even though I was not accessing the div on server side. The problem lied in the fact that on client side I was trying access the ClientID of the div like this $('#<%=divMultipleDaysOptions.ClientID%>').

提交回复
热议问题