V
Vivek Sharma
Hi There,
I have a situation where I wish to load the controls dynamically on the
basis of user role. Hence, I am using this code.
if (UserRole == "IS Administrator")
{
Control UC1 = LoadControl("../UserControls/ISJob/uctlJobGeneral.ascx");
plhISGeneral.Controls.Add(UC1);
System.Web.UI.Control UC =
Page.LoadControl("../UserControls/ISJob/uctlJobAdmin.ascx");
plhISAdmin.Controls.Add(UC);
}
else
{
System.Web.UI.Control UC1 =
Page.LoadControl("../UserControls/ISJob/uctlJobGeneral.ascx");
plhISGeneral.Controls.Add(UC1);
}
My problem is on the click of the button (which is not included within the
control) I am unable to access the properties of the user controls. How can
I access the properties?
Please help.
Vivek
I have a situation where I wish to load the controls dynamically on the
basis of user role. Hence, I am using this code.
if (UserRole == "IS Administrator")
{
Control UC1 = LoadControl("../UserControls/ISJob/uctlJobGeneral.ascx");
plhISGeneral.Controls.Add(UC1);
System.Web.UI.Control UC =
Page.LoadControl("../UserControls/ISJob/uctlJobAdmin.ascx");
plhISAdmin.Controls.Add(UC);
}
else
{
System.Web.UI.Control UC1 =
Page.LoadControl("../UserControls/ISJob/uctlJobGeneral.ascx");
plhISGeneral.Controls.Add(UC1);
}
My problem is on the click of the button (which is not included within the
control) I am unable to access the properties of the user controls. How can
I access the properties?
Please help.
Vivek