Skip to main content

Posts

Showing posts from June, 2013

Event handler to copy items from one site to another

The code can be used to copy items from one site to another ,but source and destination sites must be in same server. If the item was added newly in a Document Library , Item Checked In Event Handler must be used :    public override void ItemCheckedIn(SPItemEventProperties properties)        {            base.ItemCheckedIn(properties);            try            {                SPSite sourceSite = new SPSite("Source Site URL");                SPWeb sourceweb = sourceSite.OpenWeb();                SPList sourcelist = sourceweb.Lists["Source List"];                if (properties.ListTitle == sourcelist.Title)                {                    SPListItem sourceitem = properties.ListItem;                    string title = sourceitem["Title"].ToString();                    string description = sourceitem["ToolName"].ToString()";                    SPSite _destSite = new SPSite("Destination Site URL"

Flip Images on hover in Sharepoint 2010

Add a CEWP in the page and then use the CSS class to achieve the hover effect. These images can also be made links. There can be more than one image and put in a table format in CEWP <table width="462" height="250" align="center" style="background-color: black"><tbody><tr><td style="width: 25%"><div class="example one"><div class="wrapper"><a href="#"><img src="<image url>" alt=""/></a> </div></div></td> <td style="width: 25%"><div class="example two"><div class="wrapper"><a href="#"><img src="<image url>" alt=""/></a> </div></div></td> <td style="width: 25%"><div class="example three"><div class="wrapper"><a href="#"><img s