yeap you can certainly add controls at run time (even the ones written as
user controls in .ascx)
you can use place holder or any other container to insert the control.
something like this.
if( a == 1)
{
MyUserControl1 mUC1 = new MyUserControl1();
myPlaceHolder1.Controls.Add(mUC1);
}
else
{
MyUserControl2 mUC2 = new MyUserControl2();
myPlaceHolder1.Controls.Add(mUC2);
}
--
Regards,
Hermit Dave (D'way)
http://hdave.blogspot.com
"Aamir Mahmood" <a@b.c> wrote in message
news:eT**************@tk2msftngp13.phx.gbl...
Hello,
Can I include a control or another aspx file into a container aspx file on
the basis of some parameters?\
Like I want ControlA to be inserted in page index.aspx if the submit form
has some specific value, and ControlB otherwise.
-
AM