[英]How to get control id if control is rendered inside of master page with jQuery?
I went through some posts here but could not find exactly what I'm looking for. 我在这里浏览了一些帖子,但找不到确切的内容。
My control is rendered the following way: 我的控件通过以下方式呈现:
ctl00_ctl00_Contentplaceholder2_ContentPlaceHolder2_txtAccountNum0
How can I reference it using jQuery? 如何使用jQuery引用它?
The following does not work: 以下内容不起作用:
$('#<%=txtAccountNum0.ClientID%>')
Well, you need a #
before the ID. 好吧,您需要在ID之前输入#
。 I do that all the time. 我一直都这样。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.