custom page as default page

using (SPSite oSiteCollection = new SPSite("http://MyServer/sites/MyWikiSite"))
{
    SPWeb oWebsite = oSiteCollection.OpenWeb();
    SPFolder oFolder = oWebsite.RootFolder; 
    oFolder.WelcomePage = "My Wiki Library/MyWelcome.aspx";
    oFolder.Update();
    oWebsite.Dispose();
}

sharepoint 2010 webpart expand collapse scripts

copy the below code in CEWP (content editor webpart)  any where in the page.

<script type="text/javascript">

  
function WPToggle(thisId, ImageId)
{
if (document.getElementById(thisId).style.display=="none")
{
document.getElementById(thisId).style.display="";
document.getElementById(ImageId).src = "/_layouts/images/minus.gif";
}
else
{
document.getElementById(thisId).style.display="none";
document.getElementById(ImageId).src = "/_layouts/images/plus.gif";
}
}
 
function ExpandCollapseBody()
{
var i = 1;
var WPid = "WebPartWPQ1" ;
var WPtitleid = "MSOZoneCell_WebPartWPQ1" ;
var Toggleid = "ToggleImage1" ;
do
{
try
{
document.getElementById(WPtitleid).innerHTML = '<IMG id="' + Toggleid + '" onClick="WPToggle(\'' + WPid + '\',\'' + Toggleid + '\')" alt="Expand/Collapse" style="margin:6px 5px 0px 2px; float:left; cursor:pointer;" src="/_layouts/images/minus.gif" />' + document.getElementById(WPtitleid).innerHTML ;
if (document.getElementById(WPid).style.display=="none")
{
document.getElementById(Toggleid).src = "/_layouts/images/plus.gif";
}
}
catch(err) {}
i = i + 1;
WPid = "WebPartWPQ" + i ;
WPtitleid = "MSOZoneCell_WebPartWPQ" + i;
Toggleid = "ToggleImage" + i;
} while (document.getElementById(WPid))
}
 
_spBodyOnLoadFunctionNames.push("ExpandCollapseBody()"); </script>

HTML on mouse over change image easy steps

For images src=  "please use u r path."

<html>
<body>
<table  align ="center" cellpadding ="2" cellspacing ="2">
<tr>
<td align ="center">
<a href="#nogo"  style = "textdecoration :none">
<img src="http://xxxxx/Style%20Library/newbtDe.jpg" onmouseover="this.src='http://dsfsfddsf/Style%20Library/newbt.jpg'" onmouseout="this.src='http://sssss/Style%20Library/newbtDe.jpg'" border ="0" /></br>Add New  </a>
</td>
<td align ="center">
<a href="#nogo" style = "textdecoration :none">
<img src="http://xxxx/Style%20Library/newbtDe.jpg" onmouseover="this.src='http://xxxxxx/Style%20Library/newbt.jpg'" onmouseout="this.src='http://xxxxxx/Style%20Library/newbtDe.jpg'" border ="0" /></br> Add Next </a>
</td>
</tr>
</table>
</body>
</html>

Cheers!
Deva

SPFX - HTTPClient - Curd Operations - SharePoint list.

  Create solution in the name of SpfxCrud. ISpfxCrudProps.ts export interface ISpfxCrudProps {   description : string ;     context : an...