Scrolling announcements webpart in SharePoint

Scrolling announcement web part which on click will take you to the given link. Dynamic values and not static content. Values are coming from the list with two different columns Title(Text to show) & Link (Link to redirect). Uses JavaScript to scroll the content. You can get the code here


Get column values of item in ItemAdding event handler

In an Item Adding event handler Properties.ListItem will be null. Same is the case with Properties.BeforeProperties & Properties.AfterProperties too. So how to get the values entered in the NewForm.aspx in the ItemAdding method. Here we go.. You can access the value using AfterProperties property. But here you have to pass the internal name of the... Continue Reading →

Adding values to SharePoint People Editor using code

I was working with the People Editor Control and realized there are a couple weird things you need to do before you can read values into the control and save values into a list.  Here is a samples related to saving multiple/single user details into a people or groups column in a list. SPFieldUserValueCollection UserCollection... Continue Reading →

Required Field Validator for SharePoint People Editor

I used SharePoint People Editor control in custom asp.Net web part.I wanted to check for required field. I have tried using the property Allow Empty, but unfortunately it doesn't work. I have used a Required field validator. Luckily it works to some extent. But the problem starts if there is any post back happening on... Continue Reading →

Resizing an Image while adding as an attachment to a list Item

Event handler code to resize an an image when added as an attachment to a list item.public override void ItemAdded(SPItemEventProperties properties){     if (String.Compare(properties.ListTitle, "Brief Participant Details", true) == 0)    {         SPSite siteColl = new SPSite(properties.SiteId);         SPWeb site = siteColl.OpenWeb(properties.RelativeWebUrl);         SPList listCFPrint = site.Lists[properties.ListTitle];          ResizeImage resize = new ResizeImage();         if (properties.ListItem.Attachments.Count > 0)        {              string fileName... Continue Reading →

Create a website or blog at

Up ↑

%d bloggers like this: