Wednesday, January 20, 2010

How to Redirect to an Sharepoint Home Page after cliking on the submit button

How to Redirect to an Sharepoint Home Page after cliking on the submit button in the infopath form placed in an XmlFormView Webpart

REF: http://www.infopathdev.com/forums/t/14149.aspx

HttpContext.Current.Response.Redirect("http://yoursite.com/somepage.aspx", true);


If not try the following


I have a webpart that links to infopath forms and I do the following for the hyperlink


(Sitehostingthexml + "/_layouts/FormServer.aspx?XmlLocation=/yourlibrary/yuorxml.xml" + "&Source=/_layouts/windowclose.htm&DefaultItemOpen=1&OpenIn=Browser");


Windowclose.htm should reside in "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS"


the code for windowclose.htm is below. What I do is close the form you could do a redirect via javascript.










Please Close the following screen.

Thank You



No comments:

Post a Comment