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

InfoPath Dev

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

Last post 01-05-2010 06:08 AM by eddyblanco. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 01-02-2010 03:01 AM

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

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

    mrudula
  • 01-02-2010 04:48 AM In reply to

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

     Hi,

    Do the following on you infopath code behind.

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

    Ensure that you have the form Security with "Full Trust". That is located under Tools --> Form Options -->Security and trust.

  • 01-03-2010 08:08 PM In reply to

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

    Thanxs for your reply I tried this but i did not get the solution

     

    mrudula
  • 01-04-2010 04:41 AM In reply to

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

    Are you getting an error? or just not doing anything

  • 01-04-2010 07:54 PM In reply to

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

    i did not get error but the form is not redirecting to sharepoint home page.....

    mrudula
  • 01-05-2010 06:08 AM In reply to

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

    I was able to redirect via:

    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.

    <html>
    <head>
    <script language="javascript">
    function closewindow() {

    window.resizeTo(550, 300)

     

    window.open('','_self','');
    window.close();

     

    }


    </script>
    </head>
    <body onload="closewindow();">

     

    <STYLE>
    .alert {
    background: #fff6bf url(/_layouts/images/exclamation.png) center no-repeat;
    background-position: 15px 7%; /* x-pos y-pos */
    text-align: left;
    padding: 5px 20px 5px 45px;
    border-top: 2px solid #ffd324;
    border-bottom: 2px solid #ffd324;
    }
    </STYLE>
    <p class="alert"><FONT size=3><b>Please Close the following screen.</b><br></FONT><br>Thank You<br><br></p>
    </body>
    </html>

Page 1 of 1 (6 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.