转:http://www.techbubbles.com/sharepoint/using-sharepoint-2010-dialogs/

SharePoint 2010 dialogs are JavaScript pop-up dialogs consisting of an iframe to request the other pages in the SharePoint. These pages can be publishing pages or application pages.When you call a pop-up dialog in SharePoint 2010, the content is displayed
by using the system master page. The dialog functionality in SharePoint exposed by
SP.UI.Dialog and SP.UI.ModalDialog classes.The dialog code is included in
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\SP.UI.Dialog.js file in SharePoint server.

In order to get intellisense support for dialog functions inside VisualStudio you have to refer SP.UI.Dialog.js file. You can use the
SP.UI.ModalDialog.showModalDialog method to create a new dialog. This method takes in an options parameter which gives the details for what the dialog will display, such as the Uniform Resource Locator (URL) and the Heading for the dialog boxes.
The following code can be used to call a modal dialog window.

function OpenModalDialog(url, heading)
{
var options = SP.UI.$create_DialogOptions();
options.url = url;
options.heading = heading;
SP.UI.ModalDialog.showModalDialog(options);
}

You can call the function as below

<a href="javascript:OpenModalDialog('/SitePages/Dialogs/DefaultView.aspx?SpeakingID=52', 'SharePoint Modal dialog Demo ');"> Open Window</a>

If you do not want to pass parameters in for URL and heading then you can wrap the function as shown below

function OpenWebPage() {
var options = {
url: "/SitePages/Dialogs/DefaultView.aspx",
width: 800,
height: 600,
};
SP.UI.ModalDialog.showModalDialog(options);
}
<a href="javascript:OpenWebPage();">Open Dialog </a>

You can create an application page and then can open in dialog window, Create an empty SharePoint project in Visual Studio.

Add a new item to the project and select Application page from the dialog

Visual Studio application will automatically add a mapped folder for the %SPROOT%/Template/Layouts folder and will add the new application page in a folder named after your project.In SharePoint 2010, all system generated dialogs are based on the dialog.master
master page that can be found at %SPROOT%/Template/Layouts/Dialog.master.



Using SharePoint 2010 dialogs的更多相关文章

  1. SharePoint 2010 Pop-Up Dialogs

    转:http://kyleschaeffer.com/sharepoint/sharepoint-2010-pop-up-dialogs/ SharePoint 2010 makes it incre ...

  2. SharePoint 2010 Pop-Up Dialogs SharePoint 2010 弹出对话框

    SharePoint 2010 Pop-Up Dialogs SharePoint 2010 弹出对话框         SharePoint 2010 使得往你的站点加入对话框内容变得出乎意料的简单 ...

  3. 在SharePoint 2010中,如何找回丢失的服务账号(Service Account)密码

    背景信息: 通常在SharePoint环境中我们会使用很多的服务账号来运行各种不同的服务,尤其在企业环境中,由于权限管理条例严格,这些服务账号更是只能多不能少.面对如此多的服务账号,各个企业都会有自己 ...

  4. 安装InfoPath 2013后 SharePoint 2010 出现 “找不到 Microsoft.Office.InfoPath, Version=14.0.0....” 的错误的解决方案

    1. 症状 您的SharePoint 2010的服务器是不是最近一直出现这个错误呢? Could not load file or assembly 'Microsoft.Office.InfoPat ...

  5. Upgrade from SharePoint 2010 to SharePoint 2016

    [转]http://nikcharlebois.com/upgrade-from-sharepoint-2010-to-sharepoint-2016/ In this blog, I will go ...

  6. [SharePoint 2010] 自定义字段类型开发(二)

    在SharePoint 2010中实现View Action Button效果. http://www.sharepointblogs.be/blogs/vandest/archive/2008/06 ...

  7. SharePoint 2010 + 左侧导航(Left Nav Bar)二级菜单的修改

    SharePoint 2010 + 修改左侧导航类似顶部导航菜单的样式 查找aspmenu的控件,ID为“V4QuickLaunchMenu”,修改分别将属性“StaticDisplayLevels” ...

  8. 关于SharePoint 2010中不能使用AjaxControlToolkit的解决办法

    因为项目中有一个需求需要使用calendar控件,而且样式要和Reporting Service中的尽量一致,搜索了很久发现还是微软的AjaxControlToolkit提供的CalendarExte ...

  9. SharePoint 2010商业智能组件

    Microsoft Office SharePoint Server (MOSS) 2007中,就已经提供了很多支持商业智能的能力.其中主要的组件包含Excel Services, Reporting ...

随机推荐

  1. oracle游标小试

    有时候需要大面积的修改数据,这个时候用循环语句效率不高.而临时表又不能满足点对点修改的时候,游标似一种不错的选择(PS:好像游标也是为循环而生的吧) 现在有两张表 t1(ryid number,nam ...

  2. linux whereis which

    whereis 命令只能用于程序名的搜索,而且只搜索二进制文件(参数-b).man说明文件(参数-m)和源代码文件(参数-s). [root@localhost ~]# whereis svn svn ...

  3. Java程序员的发展前景

    不知道什么时候开始,IT业初级程序员的工作性质与进城打工的"农民工"变得如此惊人的相似.很多IT公司的高管认为"人便宜,就是要用到坏掉,然后再找更便宜.更年轻的" ...

  4. Delphi XE5 android 捕获几个事件

    以下代码能监控到以下几个事件: FinishedLaunching     BecameActive     WillBecomeInactive    EnteredBackground    Wi ...

  5. PHP运算符及php取整函数

    ceil -- 进一法取整 说明 float ceil ( float value ) 返回不小于 value 的下一个整数,value 如果有小数部分则进一位.ceil() 返回的类型仍然是 flo ...

  6. C#日期格式及其运算

    C#日期时间格式化 转载: http://www.cnblogs.com/hantianwei/archive/2010/09/23/1833228.html

  7. 使用rsyslog+loganalzey收集日志显示客户端ip

    http://www.ituring.com.cn/article/128536 rsyslog localhost 转发 http://bigsec.net/one/tool/rsyslog.htm ...

  8. 在ECLIPSE中用MAVEN和TOMCAT来建立WEBAPP

    找了很多示例,结合以下两个URL,比较简单的测试了一下. http://blog.csdn.net/clj198606061111/article/details/20221133 http://ww ...

  9. linux 使用kill命令杀死进程的几个办法

    常规篇: 首先,用ps查看进程,方法如下: $ ps -ef ……smx       1822     1  0 11:38 ?        00:00:49 gnome-terminalsmx   ...

  10. 李洪强iOS开发本人集成环信的经验总结_08_自动登录补充

    李洪强iOS开发本人集成环信的经验总结_08_自动登录补充 来到Appdelegate里面 01 - 遵守自动登录的代理协议 02 - 设置自动登录的代理 03 - 判断与实现  04 - 代理方法的 ...