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);
}
No comments:
Post a Comment