By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,770 Members | 1,564 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,770 IT Pros & Developers. It's quick & easy.

Creating User Control an display on Panel

P: n/a
Hi

I'm new to c# and I need some advice to display user controls on a target
panel.
I Intend to use some function like this

public UserControl CreateUserControl(UserControl uc)
{
if (uc==null)
{
//create this user control
uc.CreateControl();
this.pnlTarget.Controls.Add(uc);
uc.Dock = DockStyle.Fill;
}
return uc;
}
I get error on uc.CreateControl();...There is other possibilities ???
Littl sample code would be verry usefull.

TIA
PaulM
Apr 6 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.