Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
365
Loading web user controls into a WARP panel at run time
posted

Hi,

 I've got 2 WARP panels on a web page:

  1. The panel on the left contains a menu and a grid
  2. The panel on the right is empty at design time

At run time I want to dynamically load a web user control based on URL parameters into the panel on the right but I need the user control to update the grid on the left. Does anyone know if this is possible? At the moment I can load the control but when I click the button on it the control disappears and the button's click event is not raised.

I did wonder whether an alternative would be to put the WARP panel into the user control itself and load the user control into a table cell on the right. Again I can't get this to work. In this case the button's click even is raised ok (in which I update a record in a database table) but I can't get the grid in the left panel to update (this grid shows the records from the database table).

If I load all the controls at run time everything is fine.

Many thanks - Nick.

Parents
  • 24497
    posted

    Hi Nick,

    If you add children (like UserControl or whatever) in WARP on a particular condition at run time, then after a postback those child controls including all their events will be lost. Because dot-net does not support persistance of dynamic controls and it is not able to recreate them and associate events with them. However, all information about those children, their new values and their events actually exist and can be obtained. But that is not a standard and needs a lot of manual work. To start with you may debug content of Requiest.Form and other objects.

Reply Children