SharePoint Notification简单应用

前台调用:
<script type="text/javascript">
 
function ShowInfo() {
        SP.UI.Notify.addNotification(
"操作成功!"false""null)
    }
</script>
Html代码:
<href="Javascript:ShowInfo();">测试通知前台</a>

后台调用:
protected void Button1_Click(object sender, EventArgs e)
        {
            ShowInfo(
"本次操作成功!");
        }

        
private void ShowInfo(string msg)
        {
            
if (!Page.ClientScript.IsStartupScriptRegistered("showStatus"))
            {
                Page.ClientScript.RegisterStartupScript(
typeof(string), "showStatus""ExecuteOrDelayUntilScriptLoaded(function() {SP.UI.Notify.addNotification('" + msg + "', false, '', null); }, 'sp.js');"true);
            }
        }  




posted @ 2013-05-30 10:07  Jakin.zhou  阅读(108)  评论(0编辑  收藏  举报