Hi folks !!!
- state A
- state B
- state C
So i have developed the three usercontrols. Then we i have option of
- either adding to all three usersontrols to the page and hiding it according to the state
- Or, i would prefer adding the relevant usercontrol from the server side it self to the page and pass the page to the client.
// create a control
Control cntrlUCstate= new Control();
// Load that control
cntrlUCstate = LoadControl("relative path of the control");
// assume that you are using an update panel.( aupAccBal is the update panel)
aupAccBal.ContentTemplateContainer.Controls.Add(cntrlUCstate);
if you want , you can clear the control collection as well.
aupAccBal.ContentTemplateContainer.Controls.Clear();
Thanks N enjoy!!!
No comments:
Post a Comment