本文介绍了在ASP.Net中添加动态控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道如何在ASP.NET中动态添加控件.

我使用了HtmlGenericControls并将它们添加到div标签中.现在我的问题是,我想在创建控件后立即在页面上显示该控件,即是否添加了< p>标签或< a>标记,然后将其添加到< div>标签.我想在创建div标签后立即对其进行显示.

我使用递归函数创建了多达100个这样的div标签.现在,在创建所有100个标签之后,页面就会更新,但是我想在它们创建后立即添加它们.

我已经使用过AJAX更新面板,但是它对我不起作用.
有人可以在这方面给我建议吗.

I know how to add controls dynamically in ASP.NET.

I used HtmlGenericControls and added them to a div tag. Now my problem is that, I want to display the control on the page as soon as they are created, i.e. if I add a <p> tag or <a> tag and then add it to a <div> tag. I want to show the div tag as soon as its created.

I have created as many as nearly 100 such div tag using a recursive function. Now the page is updated after all the 100 tags are created but I want to add them as soon as they are created.

I have used the AJAX Update panel, but its not working for me.
Can anyone suggest me a good thing in this.

推荐答案



这篇关于在ASP.Net中添加动态控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-21 01:28