BLOG: Web Content Management

Welcome to Oshyn’s Web Content Management Blog where our experts discuss the latest developments and best practices in the Content Management industry with a focus on several leading platforms: Drupal, EPiServer, Jahia, Open Text and Sitecore.

Sitecore Rendering using .NET code

Sitecore Rendering using .NET code

Gaurav Bhatt... - Friday, October 23, 2009

Some Sitecore developers prefer using XSLT as a way of rendering content on a Sitecore website. It does allow a non- .NET Developer some really easy ways to render regular content pages but can become extremely complex once you start building dynamic pages with dynamic content. XSL also poses several performance issues as the site grows and thats where C# and .NET really comes handy.



In this post, I will talk about rendering fields using .NET code with web controls. This allows .NET developers to enjoy the same simplicity of rendering various Sitecore field types available in XSL, and it also supports the Page Editor.

One my favorite controls is Sitecore.Web.UI.WebControls.FieldRenderer web control. You can just specify the field name and the control will do the rest. If you wish to be more creative, you can use other optional parameters and have html render before and after the field value. FieldRenderer is registered as a web control rendering in Sitecore, and this allows power users to output different field types from the Page Designer too.You can also just use the Render method from the FieldRenderer class and you’d rather just get result as a string.
There are a bunch of other web controls that can be used to render specific field types like Date, Image, Link, etc.

If your goal is to also support the Page Editor, then you have to remember to use one of the above webcontrols to output field values. Just a regular Response.Write method will not go a long way.

ajax rotator
Recent Posts

RSS feeds
Tag cloud
search engine Drupal OO Development Sitecore VS2010 redundant database structure location scalability twitter code design content authoring open text delivery server social media php reddot white paper industry challenges performance online marketing integration sitecore email campaign manager open text web solutions cluster sitecore meetup lead generation sitecore layout design patterns open source tuning new sites Solr Jahia web design reddot sales 2.0 open-source lead management website design los angeles opentext sitecore oms SMM Velocity open text cms open text release management wcm frontend optimization project management ASP.NET MVC web2.0 postgis multilingual Sitecore Active Directory jquery, jquery plugin cloud computing Database data access thoughts sitecore devices deployment content mangement open text liveserver RFP sitecore user group webcomponent reddot cms target dynament LiveServer inbound marketing php5 plugin CMS usability cookie-free domain Dynamic Data marketing modules SEO cms los angeles, content management los angeles, web development los angeles, website design los angeles, web design los angeles, sitecore meetup, sitecore user group fbml javascript friendly url social 2.0 tools social network drools higher education E-commerce web marketing concrete5 boost call to action theming cms whitepaper design optimization facebook developers web development los angeles CRM Acquia software design foursquare licencing Web development Marketing Automation html Visual Basic jsp Navigation templating JSR-168 communicating configuration management web marketing for dummies editing content Ubuntu Server EPiServer oms mashups mashup mashware Actionscript 3 sitecore ECM reddot whitepaper presentation layer mysql command line CMS profile box jahia cms web design los angeles rdbs ipc template design keyword selection lucene campaigns open text management server liferay WCM Design Patterns web content management search suggest spatial reddot higher education Sharepoint drush multisite Delivery Server content management whitepaper icefaces web3.0 google profile tab content authors url enterprise asp portlets Active Directory GSA HubSpot css Maven reddot cms higher education patterns AS3 sitecore online marketing suite, online marketing suite CTA development java web evolution jquery IT Investment cms los angeles consulting mobile Ubercart IIS google search appliance oshyn ui iphone Flash EPiServer Active Directory CMS Training VPP GIS LS MVC tuckey content management los angeles ASP.NET content management white paper architecture Business Users ajax push google maps google appEngine print geographical LDAP linux VB Visual Studio missing images ubuntu jahia wcm content management systems .net keywords geo portal management facebook app, OS 3.0, three20 cloud google analytics web services APC memcache facebook ajax cms white paper Live Server dynament
2010 Copyright Oshyn. All rights reserved.