Posts

Showing posts from March, 2011

Creating a Custom Validator Control in .Net

The ASP .Net has its own form validation framework. This framework consists of: Base Validation Class, the BaseValidator ASP Validation Controls A Clientside Validation JavaScript Framework The "Base Validation Class" is the base of all validation controls and is also used to create own custom controls. If you want to create your own validation control, you have to inherit from the base class. The ASP validation controls are basic validation controls provided by Microsoft. These are: RequiredFieldControl : Checks an input field if its empty CompareValidator : Compares the value of a field with another value. This can be a value in another field or a constant value. RangeValidator : Checks if the value in a form field is within a range RegularExpressionValidator : RegularExpression validators are used to check if the value in a control matches a pattern defined by the regular expression. CustomValidator : If none of the Validators are useful for a purpose, you c...

SharePoint 2010 MySite in detail

Image
In general The SharePoint 2010 MySite has changed in major points to the one in SharePoint 2007. The most striking renewals are probably the tagging und activity features. The user can now tag, comment and rate his sites and documents. Since SharePoint 2010 has no longer a Shared Service Provider the MySite is now bound to the Profile Service. This means that the profile service must be running and configured before you can create a MySite. The MySite uses a special master page, the "mysite.master", which is activated by the feature MySiteLayouts and uploaded to the master page gallery of the MySite sitecollection. It's relatively easy to change and switch the masterpage either by hand or by feature. The sitecollection administrator can upload a masterpage to the masterpage gallery and easily switch the master. The good news for the frontend engineer is that the new mysite.master consists mostly of div layouts, so it is easier to style by css. But in general...

How to style the SharePoint "Site Actions Menu" with Firebug

Image
The site actions menu in SharePoint is generated automatically by JavaScript so you cannot look at the source code which classes are used to style the menu. I often use Firebug to check the classes and manipulate on the fly the css. But this is hard to do with the site actions menu because it disapears after a while. A little trick helps here (works in SP2010 and SP2007) Open the site in Firefox and open Firebug. Click the selection arrow and select the "Site Action" menu. Firebug Objekt Picker You will see a html code like show above. An <a> Tag surrounded by a <span> or <div>. The trick is to copy the onclick code of the <span> or <div> tag. The javascript code can vary in each enviroment. The code can be easily copied from firebug or from the html code. In my case the code is: In SP 2010 CoreInvoke('MMU_Open',byid('zz8_FeatureMenuTemplate1'), MMU_GetMenuFromClientId('zz16_SiteActionsMenu'),event,f...