InfoPath 浏览器中弹出对话框
修改XmlFormView控件增加NotifyHost事件
<InfoPath:XmlFormView id="FormControl" Style="width:100%;" runat="server" onnotifyhost="FormControl_NotifyHost"/>
<script runat="server">
protected void FormControl_NotifyHost(object sender, NotifyHostEventArgs e)
{
string jsCode = String.Format("alert('{0}');", e.Notification);
ClientScript.RegisterStartupScript(typeof(string), "AlertScript", jsCode, true);
}
</script>
在InfoPath中调用
public void CTRL1_5_Clicked(object sender, ClickedEventArgs e)
{
this.NotifyHost("String");
}
浙公网安备 33010602011771号