• Infopath Notify 弹出提示信息


    在InfoPath里弹出窗口,可以用Notify(message)就可以实现,不过要修改layouts文件夹里面一个FormServer文件

    修改后的代码为

        
            
        
    <%@ Page 
        inherits="Microsoft.Office.InfoPath.Server.Controls.FormServerPage,Microsoft.Office.InfoPath.Server, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"
        EnableSessionState="true"
        AutoEventWireup="false"
        EnableViewState="false"
        LinePragmas="false"
        Language="C#"
        ValidateRequest="true"
    %>
    <%@ Register Tagprefix="InfoPath" Namespace="Microsoft.Office.InfoPath.Server.Controls" Assembly="Microsoft.Office.InfoPath.Server, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    <script runat="server">
        
        protected void XmlFormView1_NotifyHost(object sender, NotifyHostEventArgs e)
        {   
            string jsCode = String.Format("alert(\"{0}\");", e.Notification); 
            ClientScript.RegisterStartupScript(typeof(string), "AlertScript",jsCode, true);
            }
        
    
    </script>
    
    <html>
        <head runat="server">
        </head>
        <body style="margin: 0px;overflow:auto;">
            <form runat="server" id="HostingForm" method="post" enctype="multipart/form-data" style="100%;">
                    <InfoPath:XmlFormView id="FormControl" OnNotifyHost="XmlFormView1_NotifyHost" Style="100%;" runat="server"/>
            </form>
        </body>
    </html>
  • 相关阅读:
    Cheatsheet: 2012 03.23 ~ 03.31
    Cheatsheet: 2012 04.13 ~ 04.24
    Cheatsheet: 2012 02.09 ~ 02.29
    Cheatsheet: 2012 03.01 ~ 03.12
    Cheatsheet: 2012 03.13 ~ 03.22
    Cheatsheet: 2012 01.20 ~ 01.31
    Cheatsheet: 2012 04.01 ~ 04.12
    Cheatsheet: 2012 04.25 ~ 05.03
    Cheatsheet: 2012 01.10 ~ 01.19
    1.30
  • 原文地址:https://www.cnblogs.com/gzh4455/p/2613239.html
Copyright © 2020-2023  润新知