May 2005 Entries
In ASP.Net projects I have come across numerous time that you need to position the the page at certain vertical location on PostBack. For example you might have multiple long Panels or grids that when clicked need to post back the data to the server and return to certain other panel or Grid on the Page. SmartNavigation feature of ASP.Net allows you to keep the last click position on post back but does not allow the positioning of the page to any other desired location.
Community Editor is web based WYSIWYG HTML editor. It enables ASP.Net Web developers to replace the Textarea in your existing/new Web Sites with a powerful, but easy to use WYSIWYG Editor.
This rich editing tool empowers end users with an intuitive, easy-to-use interface for creating and publishing Posts/Forms without relying on any client-side components or controls.
ASP.Net has a very powerful Cache Management component. Cache is part of the most enterprise level .Net project. ASP.Net Data Cache is very flexible and is also available to Windows application by making use of HttpRuntime.Cache object. Microsoft provides a Cache Management Application Block but it can be overkill for lot of applications .....
Here we go again. One of the simplest but kind of hidden functionality is how to determine if the current posting is accessed in live mode or in the edit mode. Microsoft Content Management Server has several modes to display the page out of these three are the most prominent ones i.e. Published , UnPublished and Editing Mode. It is frequently asked that how you can display hint to the authors while they are Creating a new posting or editing an existing one ...
A Simple to use and efficient way of validating you GUID data type. Instead of trying to create an instance and catching the exception this implementation uses Regular Expression to validate a GUID.
Here is another article in the MCMS 101 series. This one deals with getting a list of all the Channels / Postings that contain a specific Customer Property.
Remember that custom property should only be used for searches that are not very extensive and return a small set. If your have requirements of frequent searches on a Mets Information of a Channel(folder) or Posting(WebPage) then a better solution is to have a User Database linked to it. I will talk about it in my future Posts.
Here is a helper class that makes it easy to do all the data manipulation functions on the data stored in the Cookie. It makes use of HybridDictionary Collection object and is very efficient for handling data in the Cookie.
It is common to create multiple websites in a single instance of Microsoft Content Management server 2002 Server. Usually these sites share same site structure with different Content and different Skins. The simplest and efficient way to kick off a new site is to copy the child channels and posting after creating the Root channel for the New site.
I am often asked what is the optimum value to put in the “Maximum Nodes in Memory Cache” setting in the Site Configuration Application Tab 2 named Cache in your Production environment. The idea is that the node cache is big enough to hold a 'copy' of all the nodes for your entire site, so the suggested size calculated from following script is the one to go for.
During my consultancy engagements I have come across numerous time when you need to sort the value displayed in the drop down box or in the the other Data bound control. It can be very frustrating to do that if you don't have much experience with .Net and you have to repeat similar code again and again. Well .Net 2.0 will ease it quite a bit with Generics ... For now here is a class that works exactly like sorted list but sorts the List by Value instead of Key ...
MCMS 2002 has a XML placeholder definition object but there is no XML placeholder Web Control shipped with the product. Woodgrove Sample MCMS website comes with a XML placeholder control but it real annoying in the sense that you only have 10 rows of text visible at a time. It is common requirement to customize the XML placeholder feel and look and also the functionality.
The most common functionality required in any MCMS project is to get access to the content contained in the placeholder. MCMS has different kind of placeholder definitions like HtmlPlaceholder, ImagePlaceholder, XmlPlaceholder and AttachmentPalceholder. It is desirable to get the content according to the type of placeholder for e.g in case of ImagePlaceholder you want the URL of the Image or some other properties rather then just a blog of string or HTML.
It is very Common practice to hit an enter key on a text box in order to submit a form. For example if you are designing a Login Screen it is frequently required that user just hit enter after filling in the password rather then to be forced to click on the login butto itself. ASP.Net by default will just post back the form without clicking the the specified button ..... Here is the code that you can call to tie your text box to desired button you want to get clicked .....
One of the simple but very handy feature is to be able to have shortcuts on your desktop that can invoke site Manager that is pointing to Development, Content, Stagging and Production Environment.
It is a frequent reuirement that you want to print a particular section of .aspx page or just a control like DataGrid with data populated. Usually the Javascript window.print will print the whole page that includes Navigation controls and other un desired items on the printed page. In order o solve this we need to render only the User control and print it but the caviar is that this page shuld not appear to the user.