Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Products › Development › Forge › Core - WebControls Register  |  

 

dnn_ct_webcontrols_170x64.gif

 

  Quick Links  
 


  Team Leadership  

Jon Henning

jonhenning.jpg

 


  DotNetNuke Projects  
The DotNetNuke Projects are a special category of platform extensions which are developed by volunteers to conform to the high professional standards mandated by DotNetNuke Corporation. The DotNetNuke Projects are distributed as a standard part of the DotNetNuke core application release offerings.

 


  Ads  
OnyakTech
 


  Sponsors  

Meet Our Sponsors

Merak Mail Server
FCKeditor Project
Salaro -- Skins and more
OnyakTech
The best choice for your web site host, email hosting, and domain registration.
CrystalTech Web Hosting™
 


DotNetNuke® Project :: WebControls

The primary purpose of the DotNetNuke WebControls project is to allow developers to utilize feature-rich controls in their applications without the associated cost or distribution restrictions associated with commercial controls. All controls utilize the ClientAPI, and therefore support a rich client side object model, work cross-browser, and utilize AJAX functionality.

The DotNetNuke TreeView control is an open-source ASP.NET WebControl that has a rich client-side object model and supports advanced featuresets like populate on demand and keyboard navigation.
The DotNetNuke Menu control is an open-source ASP.NET WebControl that has a rich client-side object model and supports advanced featuresets like populate on demand and keyboard navigation (soon).
The DotNetNuke Label Edit control is an open-source ASP.NET WebControl that allows any label to be editable on the client where it uses a client-callback to persist the changes. Simply specify a client-side event like onclick to allow the user to edit. It supports RichText and MultiLine editing.
The DotNetNuke Text Suggest control is an open-source ASP.NET WebControl that allows any textbox to suggest the results the user is looking for by dynamically populating a menu of matched items.
The DotNetNuke Tab Strip control is an open-source ASP.NET WebControl that allows a page to be displayed in a tabular manner. It supports 3 rendering modes, including AJAX on-demand loading to allow for optimal performance.
The DotNetNuke ToolBar control is an open-source ASP.NET WebControl that allows a toolbar to be attached to any control.
 


WebControls Project Blog
Apr 13

Posted by: Jon Henning
4/13/2008

While sitting at the airport waiting for my plane to depart to the MVP Summit, I decided to spend a little time optimizing the new ClientAPI (codenamed Caspian) for the Cambrian release.  One of the new features for this release was to allow the output of the ClientAPI and Webcontrols to emit compliant markup (more detail mentioned in this blog).  There was two areas that this affected my code.

1.  The ClientAPI allows for state to be passed to and from the server via a hidden control on the page (ClientState).  This is similar to ViewState, except that it can be read and written to on the client.  This used to be serialized as a delimited string.  The question has always been, what delimiter can you use that is safe?  Originally the ClientAPI used custom escape characters for this, but as the community strongly stated, these characters were not compliant.  Ironically enough, the MacIE version of the browser choked on these characters, so the original implementation allowed for the single-character delimiters to be swapped out with 3 character delimiters via the ClientAPICaps.config file.  Community members caring about compliance simply switched their config file to emit these three characters for all browsers.

2. The other area at issue with compliance was the use of expando properties in the webcontrol's main markup.  For example, the properties for a control would use markup similar to this

<div id="menu" MouseOutDelay="100" MenuBarCss="menubar" ....

This made things very convenient for both the control developer and people troubleshooting their controls, as the properties were right next to their respective markup.  The negative being that the use of custom expando properties was not complient.  For the Caspian/DawnTreader release these expandos were moved to the ClientState feature and serialized as JSON.

One of the negatives to serializing this to JSON is that it still needs to be encoded.  JSON's use of the " character for strings proved to be a major drawback as it gets encoded into &quot;. 

nodes[{txt:"Home",id:"0"

becomes

nodes:[{txt:\&quot;Home\&quot;,id:\&quot;0\&quot;

Some people in the community have also suggested to simply use base64 encoding.  However, this also ends up with a payload much larger than desired.  The solution that I just added will detect if a compliant character is contained within the json already and if not send down a substitution character for the ".  If the character is already contained within the json, the default &quot; will be used. 

{nodes:[{txt:\`Home\`,id:\`0\`

Thats all for now, gotta catch my flight...  Hopefully I will have more time on the flight to catch up on more blogs I've been meaning to do.

Tags:
 


Icthus Technologies
Building Faith on the Internet
www.icthustech.com
Efficion Consulting
A premier DotNetNuke consulting firm providing complete DNN services including: custom module development, skinning and design, installation and integration services.
www.efficionconsulting.com
DotNetNuke Training by Engage Software
Specializing in customized training, architecture and module solutions for large scale implementations lead by DNN Core Team Member Christopher Hammond.
engagesoftware.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke® logo are registered trademarks of DotNetNuke Corporation
Hosted by MaximumASP