IT 专业人士的资源 > 论坛主页 > SharePoint - InfoPath Forms Services (pre-SharePoint 2010) > Code behind button works in Infopath with VSTA but not in browser
提出问题提出问题
 

问题Code behind button works in Infopath with VSTA but not in browser

  • 2009年12月1日 20:24Sean Sharepoint 用户奖牌用户奖牌用户奖牌用户奖牌用户奖牌
     
    I have an Infopath browser-enabled form where after information is entered, and a button control is clicked, 2 emails are sent and the form switches to its second view. The form works when debugged in VSTA, the emails are sent, and the form switches to its second view. Because there is code behind the form, the security level was set to Full Trust, signed with a certificate, and uploaded to Sharepoint via Central Administration.

    Though in Sharepoint, the form opens in Form Services, and when I click the button, a little pop up window says "Sending data to server" but the emails are never sent and the form doesnt switch to its second view.

    What gives?

全部回复

  • 2010年1月3日 6:46SYM Wong-A-Ton 用户奖牌用户奖牌用户奖牌用户奖牌用户奖牌
     
    I have an Infopath browser-enabled form where after information is entered, and a button control is clicked, 2 emails are sent and the form switches to its second view. The form works when debugged in VSTA, the emails are sent, and the form switches to its second view. Because there is code behind the form, the security level was set to Full Trust, signed with a certificate, and uploaded to Sharepoint via Central Administration.

    Though in Sharepoint, the form opens in Form Services, and when I click the button, a little pop up window says "Sending data to server" but the emails are never sent and the form doesnt switch to its second view.

    What gives?
    There might be an error taking place (silently). You may want to wrap your code with error-handing code and then send the error information to the Windows Event Log for debugging the browser form.


    S.Y.M. Wong-A-Ton, owner of the InfoPath Solutions Blog, and author of 100+ InfoPath articles and 40+ InfoPath - SharePoint integration articles