Saturday, August 20, 2011

View User's Profile Photos Next To the Name Welcome


Here is a simple way to add the photo current user profile, just before or after the user name in SharePoint 2010 the band.

Sharepoint 2010: View/Update Profile Status on Any Page


If you want to allow your users to view/update their personal Status on any page in SharePoint 2010 follow these simple steps.

Monday, August 8, 2011

How Do You Know the Country Location of User - C # Asp.net?

You can use below code snippet to get the region description of the current user.


using System.Globalization;

string name = RegionInfo.CurrentRegion.DisplayName;

For more information visit below link

http://www.msdn.microsoft.com/en-us/library/system.globalization.regioninfo(vs.71).aspx

How to Copy an Image from A URL to Your Own Server and Change Its Size

First: Download the image with Url.
Second: Resize the image and save it into disk.

1) For the first requirement, you can use WebClient class. Refer to the following code
private void Page_Load(object sender, System.EventArgs e)
{
WebClient wc = new WebClient();

byte[] data = wc.DownloadData("http://www.google.cn/intl/en-us/images/logo_cn.gif");

MemoryStream ms = new MemoryStream(data);

System.Drawing.Image img = System.Drawing.Image.FromStream(ms);

GetThumbnailImage(img);//Resize Image
}


2) For the second requirement refer to the code below:
private void GetThumbnailImage(System.Drawing.Image img)
{
float iScale = img.Height > img.Width ? (float)img.Height / 100 : (float)img.Width / 100;

img = img.GetThumbnailImage((int)(img.Width / iScale), (int)(img.Height / iScale), null, IntPtr.Zero);

MemoryStream memStream = new MemoryStream();

img.Save(Server.MapPath("att.jpeg"), System.Drawing.Imaging.ImageFormat.Jpeg);

memStream.Flush();
}

Saturday, August 6, 2011

Create a List using SharePoint Designer 2010

You can create a list of different ways, such as a browser can be used to create a list, you can use Visual Studio 2010 or you can use SharePoint Designer 2010 to create the list. Here we will discuss how to create a list using SharePoint Designer 2010. Please follow the following steps.

Free Download SharePoint 2010 Videos


You can download video tutorials SharePoint 2010 from the Microsoft website. There are other websites available for paid download video tutorials SharePoint 2010. But for free downloads, you can check

Wednesday, August 3, 2011

Getting A User's Information Is Based On An E-mail Is Stored As A Text


SPList UserInfoList = site.SiteUserInfoList;
                                        string useremail = oOpenItem["UserEmailAddress"].ToString();
                                   
                                      
                                   
                                        SPQuery query = new SPQuery();
                                        query.ViewFields = "";
                                        query.Query = "" + assigneeusername + "";

                                    
                                        SPListItemCollection UserItems = UserInfoList.GetItems(query);
                                       
                                        if (UserItems != null)
                                        {
                                            SPListItem UserItem = UserItems[0];
                                            strDept = UserItem["Department"] == null ? "No Department" : UserItem["Department"].ToString();
                                        }
                                        else
                                        {
                                            myLog.WriteEntry(assigneeusername + "Not Found");

                                        }
                                    }
                                    else
                                        strDept = string.Empty;

Getting User Information


  #region get requestor department
                          
                            SPField pplField = oOpenItem.Fields["Requestor"]; // this is user field
                            string username = oOpenItem["Requestor"].ToString(); // get the value
                            SPFieldUser userField = (SPFieldUser)pplField;
                            SPFieldUserValue fieldValue = (SPFieldUserValue)pplField.GetFieldValue(username);

                            SPList UserInfoList = site.SiteUserInfoList;
                            SPListItem UserItem = UserInfoList.GetItemById(fieldValue.User.ID);
                            strDept = UserItem["Department"] == null ? "No Department" : UserItem["Department"].ToString();
                          

                            #endregion

Calculate Truncated Decimal Number in C #


If you want to cut a certain number of double decimal, C # offers a feature Math. Truncate () returns the corresponding amount.

Problems With 64-bit SharePoint Designer


When you’ve got Office 2010 64-bit installed you can only install the 64-bit version of SharePoint Designer.

Sadly this version has some integration issues.

Monday, August 1, 2011

Stretch Text in Word 2010 how?

Microsoft Word 2010 has a function to stretch the text. Today I will tell you how to use this hidden word from Microsoft. After a few simple steps lead you to this function:

Download Visual Studio 2010 SP1 SDK


The Visual Studio 2010 SP1 SDK provides tools and templates for building Visual Studio extensions. By using the Visual Studio 2010 SP1 SDK, you can build your own tool windows, create menu commands, and add extensions to the new Visual Studio editor and other features. Note: If Visual Studio 2010 SDK is installed on your machine, uninstall it before installing this (SP1) version.