开发者

ASP.net binding expression giving object required error

开发者 https://www.devze.com 2023-04-11 03:06 出处:网络
I am coding a page that use RadAjax tools for ASP.net, now I am using RadAjax panel to update a portion of page but开发者_JAVA技巧 the problem is my page also contains ASP.net binding expressions like

I am coding a page that use RadAjax tools for ASP.net, now I am using RadAjax panel to update a portion of page but开发者_JAVA技巧 the problem is my page also contains ASP.net binding expressions like <%= textBox.ClientID %> due to these I get an error that cannot update components with <% %> so I searched google and found that this <%= %> can be replaced with this <%# %> to stop this error but now the problem is whenever the new binding statements are called I get a javascript error saying object required like on this expression.

(<%# textBox.ClientID %>).value

where textBox is standard ASP.net control.

Any ideas how can I fix this error. Thanks.


If you use <%# %> you have to databind the page (or the control). Try to call DataBind in Page_Load and see whether that fixes your problem.

protected void Page_Load(object sender, EventArgs e)
{
   DataBind();
}
0

精彩评论

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