.NETGURU
Custom Server Web Controls(4) hierarchy
Messages   Related Types
This message was discovered on ASPFriends.com 'ngfx-patterns' list.


Deyan Petrov
-- Moved from [aspngwebcontrols] to [ngfx-patterns] by Charles M. Carroll <Click here to reveal e-mail address> --

This is a multi-part message in MIME format.

--------------InterScan_NT_MIME_Boundary
Content-Type: multipart/alternative;
    boundary="----=_NextPart_000_0042_01C1BF86.ED0B05D0"

------=_NextPart_000_0042_01C1BF86.ED0B05D0
Content-Type: text/plain;
    charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

RE: [aspngwebcontrols] How to change web control status in other aspx =
pageHi guys,

I need an advice - I have 4 web controls:
1. OneValueTextBox =3D basically an <INPUT>
2. TwoValueTextBox =3D basically an <INPUT> with another hidden INPUT, =
hold 2 Values: Value and UnderlyingValue
3. OneValueFrameCombo =3D basically an <INPUT> with some JScript, which =
pops down an IFRAME with a list of items, when an item is chosen the =
IFRAME is removed and the value of the INPUT is set
4. TwoValueFrameCombo =3D basically an <INPUT> with anohter hidden INPUT =
with some JScript, which pops down an IFRAME with a list of items, when =
an item is chosen the IFRAME is removed and the values of BOTH INPUTs =
are set

I am wondering how to structure the hierarchy - whether I should use =
inheritance or composition?
TwoValueTextBox is a type of OneValueTextBox with additional hidden =
textbox OR
TwoValueTextBox has a OneValueTextBox and an additional hidden textbox

The same is for the OneValueFrameCombo and TwoValueFrameCombo.=20

Currently I am thinking of implementing it this way:
OneValueTextBox=20
TwoValueTextBox inherits OneValueTextBox=20
OneValueFrameCombo inherits OneValueTextBox=20
TwoValueFrameCombo inherits TwoValueTextBox=20

Suggestions?

Regards,
Deyan Petrov

------=_NextPart_000_0042_01C1BF86.ED0B05D0
Content-Type: text/html;
    charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>RE: [aspngwebcontrols] How to change web control =
status in other aspx page</TITLE>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2712.300" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi guys,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I need an advice - I have 4 web=20
controls:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>1. OneValueTextBox =3D basically an=20
<INPUT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>2. TwoValueTextBox =3D basically an =
<INPUT>=20
with another hidden INPUT, hold 2 Values: Value and =
UnderlyingValue</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>3. OneValueFrameCombo =3D basically an =
<INPUT>=20
with some JScript, which pops down an IFRAME with a list of items, when =
an item=20
is chosen the IFRAME is removed and the value of the INPUT is =
set</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>4. TwoValueFrameCombo =3D basically an =
<INPUT>=20
with anohter hidden INPUT with some JScript, which pops down an IFRAME =
with a=20
list of items, when an item is chosen the IFRAME is removed and the =
values=20
of BOTH INPUTs are set</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I am wondering how to structure the =
hierarchy -=20
whether I should use inheritance or composition?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>TwoValueTextBox is a type of =
OneValueTextBox with=20
additional hidden textbox OR</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>TwoValueTextBox has=20
a OneValueTextBox and an additional hidden =
textbox</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>The same is for the OneValueFrameCombo =
and=20
TwoValueFrameCombo. </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Currently I am thinking of implementing =
it this=20
way:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>OneValueTextBox </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>TwoValueTextBox inherits =
OneValueTextBox=20
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>OneValueFrameCombo inherits  =
OneValueTextBox=20
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>TwoValueFrameCombo inherits =20
TwoValueTextBox </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Suggestions?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Regards,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Deyan Petrov</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV></BODY></HTML>

------=_NextPart_000_0042_01C1BF86.ED0B05D0--

--------------InterScan_NT_MIME_Boundary--

Reply to this message...
 
    
Paul D. Murphy
If it were me I would build a control collection of textboxes that
tracked the children. With this I would manage a collection of textboxes
and flip on and off the visible property. That would be the easiest way.

Paul

-----Original Message-----
From: Deyan Petrov [mailto:Click here to reveal e-mail address]=20
Sent: Wednesday, February 27, 2002 6:05 AM
To: ngfx-patterns
Subject: [ngfx-patterns] Custom Server Web Controls(4) hierarchy

-- Moved from [aspngwebcontrols] to [ngfx-patterns] by Charles M.
Carroll <Click here to reveal e-mail address> --

This is a multi-part message in MIME format.

--------------InterScan_NT_MIME_Boundary
Content-Type: multipart/alternative;
    boundary=3D"----=3D_NextPart_000_0042_01C1BF86.ED0B05D0"

------=3D_NextPart_000_0042_01C1BF86.ED0B05D0
Content-Type: text/plain;
    charset=3D"iso-8859-1"
Content-Transfer-Encoding: quoted-printable

RE: [aspngwebcontrols] How to change web control status in other aspx =
=3D
pageHi guys,

I need an advice - I have 4 web controls:
1. OneValueTextBox =3D3D basically an <INPUT>
2. TwoValueTextBox =3D3D basically an <INPUT> with another hidden INPUT, =
=3D
hold 2 Values: Value and UnderlyingValue
3. OneValueFrameCombo =3D3D basically an <INPUT> with some JScript, =
which
=3D
pops down an IFRAME with a list of items, when an item is chosen the =3D
IFRAME is removed and the value of the INPUT is set
4. TwoValueFrameCombo =3D3D basically an <INPUT> with anohter hidden =
INPUT
=3D
with some JScript, which pops down an IFRAME with a list of items, when
=3D
an item is chosen the IFRAME is removed and the values of BOTH INPUTs =
=3D
are set

I am wondering how to structure the hierarchy - whether I should use =3D
inheritance or composition?
TwoValueTextBox is a type of OneValueTextBox with additional hidden =3D
textbox OR
TwoValueTextBox has a OneValueTextBox and an additional hidden textbox

The same is for the OneValueFrameCombo and TwoValueFrameCombo.=3D20

Currently I am thinking of implementing it this way:
OneValueTextBox=3D20
TwoValueTextBox inherits OneValueTextBox=3D20
OneValueFrameCombo inherits OneValueTextBox=3D20
TwoValueFrameCombo inherits TwoValueTextBox=3D20

Suggestions?

Regards,
Deyan Petrov

------=3D_NextPart_000_0042_01C1BF86.ED0B05D0
Content-Type: text/html;
    charset=3D"iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>RE: [aspngwebcontrols] How to change web control =3D
status in other aspx page</TITLE>
<META http-equiv=3D3DContent-Type content=3D3D"text/html; =3D
charset=3D3Diso-8859-1">
<META content=3D3D"MSHTML 6.00.2712.300" name=3D3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D3D#ffffff>
<DIV><FONT face=3D3DArial size=3D3D2>Hi guys,</FONT></DIV>
<DIV><FONT face=3D3DArial size=3D3D2></FONT> </DIV>
<DIV><FONT face=3D3DArial size=3D3D2>I need an advice - I have 4 =
web=3D20
controls:</FONT></DIV>
<DIV><FONT face=3D3DArial size=3D3D2>1. OneValueTextBox =3D3D basically =
an=3D20
<INPUT></FONT></DIV>
<DIV><FONT face=3D3DArial size=3D3D2>2. TwoValueTextBox =3D3D basically =
an =3D
<INPUT>=3D20
with another hidden INPUT, hold 2 Values: Value and =3D
UnderlyingValue</FONT></DIV>
<DIV><FONT face=3D3DArial size=3D3D2>3. OneValueFrameCombo =3D3D =
basically an
=3D
<INPUT>=3D20
with some JScript, which pops down an IFRAME with a list of items, when
=3D
an item=3D20
is chosen the IFRAME is removed and the value of the INPUT is =3D
set</FONT></DIV>
<DIV><FONT face=3D3DArial size=3D3D2>4. TwoValueFrameCombo =3D3D =
basically an
=3D
<INPUT>=3D20
with anohter hidden INPUT with some JScript, which pops down an IFRAME =
=3D
with a=3D20
list of items, when an item is chosen the IFRAME is removed and the =3D
values=3D20
of BOTH INPUTs are set</FONT></DIV>
<DIV><FONT face=3D3DArial size=3D3D2></FONT> </DIV>
<DIV><FONT face=3D3DArial size=3D3D2>I am wondering how to structure the =
=3D
hierarchy -=3D20
whether I should use inheritance or composition?</FONT></DIV>
<DIV><FONT face=3D3DArial size=3D3D2>TwoValueTextBox is a type of =3D
OneValueTextBox with=3D20
additional hidden textbox OR</FONT></DIV>
<DIV><FONT face=3D3DArial size=3D3D2>TwoValueTextBox has=3D20
a OneValueTextBox and an additional hidden =3D
textbox</FONT></DIV>
<DIV><FONT face=3D3DArial size=3D3D2></FONT> </DIV>
<DIV><FONT face=3D3DArial size=3D3D2>The same is for the =
OneValueFrameCombo
=3D
and=3D20
TwoValueFrameCombo. </FONT></DIV>
<DIV><FONT face=3D3DArial size=3D3D2></FONT> </DIV>
<DIV><FONT face=3D3DArial size=3D3D2>Currently I am thinking of =
implementing
=3D
it this=3D20
way:</FONT></DIV>
<DIV><FONT face=3D3DArial size=3D3D2>OneValueTextBox </FONT></DIV>
<DIV><FONT face=3D3DArial size=3D3D2>TwoValueTextBox inherits =3D
OneValueTextBox=3D20
</FONT></DIV>
<DIV><FONT face=3D3DArial size=3D3D2>OneValueFrameCombo inherits  =
=3D
OneValueTextBox=3D20
</FONT></DIV>
<DIV><FONT face=3D3DArial size=3D3D2>TwoValueFrameCombo =
inherits =3D20
TwoValueTextBox </FONT></DIV>
<DIV><FONT face=3D3DArial size=3D3D2></FONT> </DIV>
<DIV><FONT face=3D3DArial size=3D3D2>Suggestions?</FONT></DIV>
<DIV><FONT face=3D3DArial size=3D3D2></FONT> </DIV>
<DIV><FONT face=3D3DArial size=3D3D2>Regards,</FONT></DIV>
<DIV><FONT face=3D3DArial size=3D3D2>Deyan Petrov</FONT></DIV>
<DIV><FONT face=3D3DArial size=3D3D2></FONT> </DIV>
<DIV><FONT face=3D3DArial size=3D3D2></FONT> </DIV>
<DIV><FONT face=3D3DArial size=3D3D2></FONT> </DIV>
| [ngfx-patterns] member Click here to reveal e-mail address =3D YOUR ID
| http://www.aspfriends.com/aspfriends/ngfx-patterns.asp =3D JOIN/QUIT
</BODY></HTML>

------=3D_NextPart_000_0042_01C1BF86.ED0B05D0--

--------------InterScan_NT_MIME_Boundary--

Reply to this message...
 
 




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification