Click here to Skip to main content
15,885,216 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi i have a master page and some user control .i wanna load user controls in master page dynamicaly.i had to know which user control is located in form when a post back occur .i use following code but it is not working.my problem is how can i recognize which usercontrol loaded before postback.
C#
if (Page.FindControl("ContentPlaceHolder").FindControl("UC1") == null)
    Control ctl = LoadControl("MasterDetail.ascx");
                     ctl.ID = "UC2";
                     flag = 1;
                     this.ContentPlaceHolder.Controls.Add(ctl);
Posted
Updated 6-Jul-13 2:23am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900