"ASP.NET 2005 custon server control" in "ASP.NET 2003 application"

E

Electric Co.

Hello,

I have two questions:

1.) Could I create a custom server control in 2005 in order to leverage
the CompositeControl base class and then use that control in 2003?
(fingers crossed but guessing aboslutely not)

2.) How good does ASP.NET 2005 handle a custom composite control inside
of a custom composite control ?

For example:

Cntrl_A inherits from CompositeControl and does all sorts of neat stuff

Cntrl_B also inherits from CompositeControl and has two instances of
Cntrl_A (as per below)

Protected Overrides Sub CreateChildControls()
Controls.Clear()

cntrl_A1= New Cntrl_A()
cntrl_A1.ID = "FirstControl"
cntrl_A2= New Cntrl_A()
cntrl_A2.ID = "SecondControl"

Me.Controls.Add(cntrl_A1)
Me.Controls.Add(cntrl_A2.)
End Sub

Thinking MicroSoSoft may have troubles with postbacks and validations
if controls get nested too deep. If not then I might need to upgrade.

Thanx in advance.
 
C

Cowboy \(Gregory A. Beamer\)

Electric Co. said:
Hello,

I have two questions:

1.) Could I create a custom server control in 2005 in order to leverage
the CompositeControl base class and then use that control in 2003?
(fingers crossed but guessing aboslutely not)

You are a great guesser.
2.) How good does ASP.NET 2005 handle a custom composite control inside
of a custom composite control ?

For example:

Cntrl_A inherits from CompositeControl and does all sorts of neat stuff

Cntrl_B also inherits from CompositeControl and has two instances of
Cntrl_A (as per below)

Protected Overrides Sub CreateChildControls()
Controls.Clear()

cntrl_A1= New Cntrl_A()
cntrl_A1.ID = "FirstControl"
cntrl_A2= New Cntrl_A()
cntrl_A2.ID = "SecondControl"

Me.Controls.Add(cntrl_A1)
Me.Controls.Add(cntrl_A2.)
End Sub

Thinking MicroSoSoft may have troubles with postbacks and validations
if controls get nested too deep. If not then I might need to upgrade.

It should not be a problem. You have to nest pretty deep before you get
yourself into serious trouble. Poorly designed controls can certainly cause
problems, however.
 

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,995
Messages
2,570,233
Members
46,820
Latest member
GilbertoA5

Latest Threads

Top