Saturday, October 8, 2011
Best Practices: Using Disposable Windows SharePoint Services Objects
Modal PopUp in SharePoint
Have always got stuck in this.
/// <summary>
/// Generates a modal popup
/// </summary>
/// <param name="sTitleOfThePage"></param>
/// <param name="sWidthOfTheWindow"></param>
/// <param name="sHeightOfTheWindow"></param>
/// <param name="LinkOfThePageThatNeedsToBeOpened"></param>
private void CallModalPopUp(string sTitle, string sWidth, string sHeight, string newLink)
{
string command = "ExecuteOrDelayUntilScriptLoaded(function () {var options = SP.UI.$create_DialogOptions(); options.title = \""+sTitle+"\"; options.width = "+sWidth+"; options.height = "+sHeight+"; options.url = \"" + newLink + "\"; SP.UI.ModalDialog.showModalDialog(options);}, \"sp.js\");";
Page.ClientScript.RegisterStartupScript(this.GetType(), "PopupScript", command, true);
}
/// <summary>
/// Generates a modal popup
/// </summary>
/// <param name="sTitleOfThePage"></param>
/// <param name="sWidthOfTheWindow"></param>
/// <param name="sHeightOfTheWindow"></param>
/// <param name="LinkOfThePageThatNeedsToBeOpened"></param>
private void CallModalPopUp(string sTitle, string sWidth, string sHeight, string newLink)
{
string command = "ExecuteOrDelayUntilScriptLoaded(function () {var options = SP.UI.$create_DialogOptions(); options.title = \""+sTitle+"\"; options.width = "+sWidth+"; options.height = "+sHeight+"; options.url = \"" + newLink + "\"; SP.UI.ModalDialog.showModalDialog(options);}, \"sp.js\");";
Page.ClientScript.RegisterStartupScript(this.GetType(), "PopupScript", command, true);
}
Sunday, September 25, 2011
Error occurred in deployment step ‘Activate Features’: Object reference not set to an instance of an object.
This just means that some custom EventReceiver code you have written is failing.
Comment out your code and add it in step by step until you discover the problomatic code
Comment out your code and add it in step by step until you discover the problomatic code
Tuesday, September 20, 2011
Add Footer to Master Page
1. Open the v4.master page using SharePoint Designer 2010 and look for:
DeveloperDashboard
2. Copy and paste the div below into code view of the v4.master page.
<div class="ms-wpselectlink" style="clear: both; padding: 10px; background-color: #FCFCFC; border: 1px solid #DBDDDE;">
© Copyright 2010
<span lang="en-us">Go MCD Technology</span>
</div>
© Copyright 2010
<span lang="en-us">Go MCD Technology</span>
</div>
3. Be sure the above code is immediately before the line below.
<SharePoint:DeveloperDashboard runat="server"/>
Tuesday, September 6, 2011
Create custom NewForm.aspx or EditForm.aspx for a list
Lovely demo provided here - Click Here
Reference list for SharePoint internal field names
This - Click Here lists the internal names of commonly used fields in SharePoint
Subscribe to:
Posts (Atom)