Wednesday, June 16, 2010

Reading the valus from People/Group field from the sharepoint custom list

Here I am explaining how to get user mail from the people/Group field in customlist.
In the sharepoint list while inserting the data in to People/Group field ,the value will be saved like a name with id (no email will be saved).

Monday, December 7, 2009

Reading the values from people/group field in sharepoint

Reading the values(Email,username) from people/group field from sharepoint list


public SPUser GetSPUserFromID(string listName, SPItemEventProperties properties,string Current Value)



{

SPFieldUser userField = (SPFieldUser)properties.OpenWeb().Lists[listName].Fields.GetField("Current filed");


SPFieldUserValue fieldValue = (SPFieldUserValue)userField.GetFieldValue(Current value);





SPUser user = fieldValue.User;
string Email=user.Email;


return user;



}

Wednesday, September 9, 2009

What is Microsoft infopath 2007?


Recently I have gone through a good article and I want to share with you.It provides the complete information about microsoft infopath and how to use ?where to use?

http://www.learnthat.com/Software/learn/1375/Microsoft-Infopath-Tutorial-and/
http://www.dotnetspider.com/forum/222333-What-use-infopath-forms.aspx


Wednesday, August 26, 2009

Deleting an item from sharepoint list

If you would like to delete an item from SPListItemCollection in share point,
Use the following code


SPSite site = null;
SPWeb web = null;

try
{
SPSecurity.RunWithElevatedPrivileges(delegate()
{
site = SPContext.Current.Site;
site.AllowUnsafeUpdates = true;
web = site.OpenWeb();
SPList list = web.Lists["Test"];
SPQuery oQuery = new SPQuery();
oQuery.Query = "" + txtGaugeID.Text + "";
SPListItemCollection oDeleteCollection = list.GetItems(oQuery);
if (oDeleteCollection.Count > 0)
{

for (int i = oDeleteCollection.Count - 1; i > -1; i--)
{
oDeleteCollection.Delete(i);
}
}
});

}
catch (Exception ex)
{
Response.Write(ex.Message);
}

Monday, July 27, 2009

Blocking anonymous users from sharepoint lists

To block the anonymous users from viewing the sharepoint lists add the following code in your web.config file

[CODE][location path="lists"]
[system.web]
[authorization]
[deny users="?"]
[/authorization]
[/SYSTEM.WEB]
[/location][/CODE}

Friday, July 24, 2009

How to integrate outlook calendar items in sharepoint?

Just follow the following code to view your out look items in sharepoint.
To see the inbox items

//'OBJECT classid="CLSID:0006F063-0000-0000-C000-000000000046" width="100%" style="height: 400px"'

To integrate the outlook calendar

//'OBJECT classid="CLSID:0006F063-0000-0000-C000-000000000046" width="100%" style="height: 400px"'

use the '<>' instead of //


Friday, July 17, 2009

About sharepoint 2010

Microsoft has recently announced that the new SharePoint version will be called "Microsoft SharePoint 2010."

Recently I have gone through the following video and tutorial in microsoft site.Please have a look at the following link to know more about sharepoint 2010.


http://sharepoint.microsoft.com/2010/Sneak_Peek/Pages/Overview-Video.aspx