Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Alternative to Visual Foxpro
Message
From
27/05/2008 14:33:21
 
 
To
27/05/2008 13:18:50
John Baird
Coatesville, Pennsylvania, United States
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01319496
Message ID:
01319750
Views:
13
Hi John,

Did you read his article? My gosh, it can be done, but sheesh! What a pain! I love this part:

This is still pretty messy. Maybe there’s an easier way, but I haven’t seen it.

FWIW, Whidbey will not make this any easier. In fact, in Whidbey without CodeBehind you will never see the control declarations defined in the base form as Whidbey declares these controls at runtime JIT compile time. The approach above will still work, but you’ll have to create each control declaration explicitly rather than just cutting and pasting once.

On the other hand for a more serious type of control I suppose it would make sense to ditch the User Control approach altogether and just build a full fledged Server Control which provides more options. Unfortunately you loose the ability to easily modify the layout higher up in the hierarchy unless you build a fairly sophisticated UI handler into the control. Trade offs... but it sure would be nice if there was an easier solution to building some mechanism of encapsulation into ASP.NET - or rather the ASP.NET designers. If the designers would understand that there is a control defined in the base class (not the code behind class) and would leave alone that control, this whole thing would actually work without any kludges. Of course in Whidbey this becomes even more problematic as controls get injected at runtime...

This is something that will have to be addressed sooner or later in the product...



>>>I glanced over that and it looks like creating a user control from scatch or in one case, subclassing from the standard controls, not visually subclassing. The difference is in the visual subclassing ability - even in the example you shared you have to manually add code. Or did I miss something?
>>>
>>>
>>Yes, looks like you can visually create a UserControl in Windows forms and then inherit from it. The functionality seems to be very similar to VFP visual subclassing from the first quick try.
>>
>>>>Dunno about asp, but in a winforms enviromment, think it is called a user control.
>>>>
>>>>http://msdn.microsoft.com/en-us/library/aa302342.aspx
>>>>
>>>>I have not actually done it - so I can be wrong
>>
>>In ASP.NET you can create UserControls as well. I'm not sure you can subclass them.
>
>You can subclass just about everything in .Net. ASP.NET user controls are no different.
>Check out: http://www.west-wind.com/WebLog/posts/786.aspx
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform