Is it possible to append an Updatepanel control to a page using Javascript/Jquery?
I'm trying to develop a system where users can drag icons (which represent user controls) onto a web page.
However, the user controls need to be housed in an updatepanel
(or similarly AJAX enabled frame) so that they can be updated without having to refresh the whole page, etc. The usual AJAX drill.
Currently the users drag the icons onto a central area and I'm using the JQuery UI draggable library to detect when an item is dropped. It's at this point I need to insert an updatepanel
on to the page so that I can fill it with content.
Being a server side control it's unfortunately not as simple as
Document.createElement('UpdatePanel');
So is there a way in which I can create an ajax enabled control via javascript which can be appended to my page and referenced server si开发者_运维知识库de?
If the number of updatepanels that you want to add to the page dynamically are limited, you can add them from the server side, and hide them to the user with css. If the user makes the action of adding the updatepanel, you only have to make the updatepanel visible. This can be done with javascript at client side and asp.net will be happy.
精彩评论