Dave Burke : Freelance .NET Web Developer specializing in Online Communities

Smart Image Links and other Wrapped CS Content

The Community Server Controls source library contains a WrappedContentBase class that can be extended for a variety of purposes, making it very easy to build context-aware controls to use in conjunction with other CS Chameleon List, Data and Form controls.

If you search ": WrappedContentBase" in the Community Server SDK you'll find examples of controls derived from the class performing various functions.  I'm going to demonstrate using a smart image link to display a custom email Modal Window.  The final product looks like this.


 

WrappedContentBase-derived Chameleon controls are first cousins to other data-based controls, so I keep them with their immediate family of controls.


 

The HyperLinked image uses the <DBVT:POGroupData /> Chameleon control in current context as its datasource.   There is a certain symmetry between these WrappedContentBase controls and WrappedFormBase-derived Chameleon Form controls.  In the code excerpt below we see the role of the context datasource, a custom POGroup object, passing the object's POID value to the Modal Window URL.


 

But what is possibly the most compelling feature of WrappedContentBase controls is how they can be so easily dropped on a page as shown below.


Comments (0) | Post RSS RSS comment feed

Posted on 1/24/2008 10:13:46 PM by Dave Burke
Categories: .NET | Community Server

Related posts

Comments are closed

Copyright © 2008 Dave Burke Consulting  |  All Rights reserved.