One of the nice tool to explore SharePoint Web App/Site Collection/Sites/Items,etc is to use WSS Explorer. You can download it from MSDN
Programmatically Search Settings Configuration in Moss 2007
Today i found an article for setting search configuration in Moss 2007 using API.
string url = “your site collection url”;
using (SPSite site = new SPSite(url))
using (SPWeb web = site.RootWeb)
{
string searchCenter = “your search center url”;
web.AllProperties[“SRCH_ENH_FTR_URL”] = searchCenter;
web.Update();
}
Thanks to Gary Lapointe MVP.
Javascript How to get parent element value without ID
I need to get the parent node value from the current node click event (without using ID, since the data is generated using some automated process, so i don’t know the ID value during construction of element).
I used the following code to achieve this
JS :
function fnGetParentNodeValue(anchorTag)
{
var ParentContent = document.activeElement.parentElement.children[0].innerHTML;
alert(ParentContent);
}
HTML :
<div><a href=”javascript:fnGetParentNodeValue(this)”>GetParentData</a></div>
SharePoint Webpart Maintenance page
If you need to go to Moss 2007 web part maintenance page just append the ?contents=1 in the page
For Eg: http://mysharepoint.com/pages/mytest.aspx?contents=1
The above page will open the maintenance page to close any webparts.
How to get Site usage data
Moss 2007 get the site usage data using API , follow the simple steps to get the usage data.
string stURL = “http://mysite.com/”;
using (SPWeb spWeb = new SPSite(stURL).OpenWeb())
{
Response.Write(” Current site collection usage in MB = ” + (spWeb.Site.Usage.Storage * 1.0) /(1024 * 1024 * 1.0 ));
}
WSS Best practices
For Best Practices for WSS/MOSS development visit this link