元素Gridview无法与元素更新面板嵌套 [英] Element Gridview can not be nested with in the element update panel

查看:59
本文介绍了元素Gridview无法与元素更新面板嵌套的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有





每当我尝试在ajax更新面板中封装div,gridView或表控件时,都会出现以下错误。如何摆脱这个。







Element Gridview不能嵌套在元素中更新面板







关注

Dear All


Whenever I try to encapsulate div,gridView or table control inside the ajax update panel it give the following error. How to get rid of this.



"Element Gridview can not be nested with in the element update panel"



Regards

推荐答案

如果您共享相关代码,人们可以更轻松地发现问题。请考虑以下将来的问题。



现在,为了回答您的问题,您忘记在UpdatePanel中添加 ContentTemplate 标记。然后,只有你可以将其余的内容放在ContentTemplate中。

你的标记应该看起来像 -

It would be easier for peoples to spot the problem easily if you have shared the relevant code. Please consider this for your future questions.

Now, to answer your question, you have forgotten to add ContentTemplate tag inside the UpdatePanel. Then only you can place rest of the content inside the ContentTemplate.
Your markup should look like-
<asp:UpdatePanel id="UpdatePanel1" runat="server" >
<ContentTemplate>
<!-- You Gridview goes here -->
<div>
<!-- like this div -->
</div>
</ContentTemplate>
</asp:UpdatePanel>





希望,它有帮助:)



Hope, it helps :)


你需要包含一个< ContentTemplate> 元素优先:



You need to include a <ContentTemplate> element first:

<asp:UpdatePanel runat="server" ID="upViewUpdate" ChildrenAsTriggers="false" UpdateMode="Conditional">
    <ContentTemplate>
        content
    </ContentTemplate>
    <Triggers>
        Triggers for auto postback
    </Triggers>
</asp:UpdatePanel>


这篇关于元素Gridview无法与元素更新面板嵌套的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆