I am having the same exact issue as mentioned here: http://social.msdn.microsoft.com/Forums/en/sharepointinfopath/thread/d83e7c6e-f01f-42c9-94fd-20ca78db27d8.
Here is my code: public void CTRL1_5_Clicked(object sender, ClickedEventArgs e)
{
string url = MainDataSource.CreateNavigator().SelectSingleNode("/my:myFields/my:field1", NamespaceManager).Value; HttpContext.Current.Response.Redirect(url, false);
}
If the url is
http://www.google.com. It works!
but (the url of my browser form): http://server/_layouts/FormServer.aspx?XsnLocation=http://server/FormServerTemplates/Access%20Request%20Forms.xsn&SaveLocation=http%3A%2F%2Fserver%2FAccess%20Request%20Forms&Source=http%3A%2F%2Fserver%2FAccess%2520Request%2520Forms%2FForms%2FAllItems%2Easpx&DefaultItemOpen=1 Does not work!
I get this error on button click:
| An error occurred submitting this form to the Web server. The form will now be closed. |
|
Click Start Over to load a new copy of the form. If this error persists, contact the support team for the Web site.
Click Close to exit this message. |
Am I doing somthing wrong? Is there another way to redirect a form on submit?