【发布时间】:2015-01-14 10:27:44
【问题描述】:
我正在尝试将 asp:textbox 的 id 检索到 itemplate 中。 我试过这样的事情:
var pu= window.document.getElementById("prixID");
它返回空值。我也试过了
window.document.getElementById("<%=prixID.ClientID%>");
它返回 prixID 不在实际上下文中。
如何解决这个问题?
【问题讨论】:
-
您的 prixID 是否在母版页中,脚本是否在 Web 表单中?
-
你在
ItemTemplate中有TextBox? -
是的,我的文本框在 itemtemplate 中
-
你试过我的解决方案了吗?
标签: javascript c# asp.net