Custom Server Control

K

knighthawkgamer

I am creating a custom control that inherits from Panel. I have the
control created but I need to figure out how to be able to drag
controls from the toolbox onto my control. Does anyone know how to
accomplish this?
 
J

JerryWEC

Is this a UserControl? If it is you can just drag your user control from the
solution explorer to your aspx page.

JerryM
 
K

knighthawkgamer

It is a custom server control. Not a user control. I am not having
problems adding the control to the page. I am having problems adding
other controls to this control.

Ryan
 
A

addup

It is a custom server control. Not a user control. I am not having
problems adding the control to the page. I am having problems adding
other controls to this control.

Ryan

Inherits System.Web.UI.WebControls.Panel ?

Why can't you drop controls onto it? I have one like that, and it's
fine.
does it claim "Error creating control" ?

can't really say any more without looking at code

-- a --
 
K

knighthawkgamer

It is a simple inherits from panel right now and when I try and drag a
control onto it I get the circle with a slash through it and the
control won't drop onto my panel.

Ryan
 
A

addup

It is a simple inherits from panel right now and when I try and drag a
control onto it I get the circle with a slash through it and the
control won't drop onto my panel.

Ryan


Hmm... like i said, i got one that works fine.

Code, please

-- a --
 
K

knighthawkgamer

Never mind it decided it wanted to work now. I guess I just needed to
restart VS.

Ryan
 
B

bhar

Hi,

See the post i have done in ASP.Net forum
(just above this forum). I have given differences between User control
and Custom server control.

Hope it helps you. More articles, log on to: http://www.vkinfotek.com

Regards
bhar
 
K

knighthawkgamer

I already know the difference. Please stop trying to promote yourself.
The problem has been resolved and it works like I expect it to. I have
created multiple custom server controls and so I know the difference.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,147
Latest member
CarenSchni
Top