Sunday, June 26, 2011

Custom properties in visual web parts

When you are developing visual web parts in SharePoint 2010 and you need to have custom properties in your web part you need to know few things in order to connect the webpart class file to user control code behind file in order to have access to the web part properties in the user control code behind file.  Following are the steps that you should go through:


1- put your custom properties in the web part class file.
    example:
        private static string _fbaurls = "";
        [System.Web.UI.WebControls.WebParts.WebBrowsable(true),
        System.Web.UI.WebControls.WebParts.Personalizable(PersonalizationScope.Shared),
        System.Web.UI.WebControls.WebParts.WebDisplayName("آدرس سیستمهای Forms Authentication "),
        System.Web.UI.WebControls.WebParts.WebDescription("آدرس سسیتمهای Forms Authentication را در این قسمت وارد کنید. برای جداسازی آنها از علامت ; استفاده کنید."),
        System.ComponentModel.Category("تنظیمات"),
        System.ComponentModel.DefaultValue("")]

        public string FBAUrls
        {
            get { return _fbaurls; }
            set { _fbaurls = value; }
        }

2- then you need to change the
CreateChildControls method as below to convert the page controls to the user control class:
        protected override void CreateChildControls()
        {
            SystemLinksWPUserControl control = (SystemLinksWPUserControl)Page.LoadControl(_ascxPath);
            Controls.Add(control);
        }

3- like the piece of code below define a consumer property in user control code behind file:
        private static string _fbaurls;
        public string FBAUrls
        {
            get { return _fbaurls; }
            set { _fbaurls = value; }
        }


4- in last step, map the properites in web part class file and user control code behinde file together in CreateChildControls method. It should be something like this:
        protected override void CreateChildControls()
        {
            SystemLinksWPUserControl control = (SystemLinksWPUserControl)Page.LoadControl(_ascxPath);
            control.FBAUrls = this.FBAUrls;
            controls.Add(control);
        }

Friday, June 3, 2011

Lync Server 2010 and SharePoint Integration

Lync Server 2010 is the new generation of Office Communications Server . According to "Lync 2010 Integration" article in technet:

With Lync and Microsoft SharePoint Server integration, Lync users can do the following:
  • Use the Skill view, in Lync search results, to search Microsoft SharePoint Server 2010 My Site pages for people with specific skills or expertise
  • Access their SharePoint Server 2010 My Site profile page from the Lync - Options dialog box
  • On a SharePoint Server page, view a user’s Lync presence indicator and its associated menu or contact card
Here is the step by step guide for deploying Lync Server 2010 Enterprise Edition which I found it complete and useful to getting start (just as a note, in this guide audio and video conferencing feature weren't enabled during topology building step, if you want to have this features you must enable "conferencing, which includes audio, video, and application sharing" in "select features" page).


After your successful installation, you can find Microsoft Lync Server 2010 Client and Device Deployment Guide here .

One of the cool improvements in Lync Server 2010 in comparison with OCS 2007 is its administration Control Panel. It provides a graphical user interface to manage configurations and users which I liked it the most.
To find out about clients features see Lync server 2010 Client Features Comparison Table and just for final point all features that we have had in live meeting and office communicator now is gathered in only Lync client.