开发者

create control in run time

开发者 https://www.devze.com 2023-01-08 01:20 出处:网络
I had task in web solution as button when I click on the b开发者_开发技巧utton it create data list with some controls on data list and when I click second it create second data list and so on I want t

I had task in web solution as button when I click on the b开发者_开发技巧utton it create data list with some controls on data list and when I click second it create second data list and so on I want to know how can I do this?


You need placeholders like asp:panel, or even another datalist to add your datalists too. But, the basic idea is that, on the button click event, you instantiate a new datalist with controls, and add that datalist to the placeholder.

If there is a well-defined # of datalists, then you could put them in updatepanels and make them visible or invisible after the buttonclick.

0

精彩评论

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