How to execute a hyperlink in event handler code - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

How to execute a hyperlink in event handler code

Last post 08-01-2011 11:49 PM by Patrick Halstead. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 07-28-2011 09:32 AM

    How to execute a hyperlink in event handler code

    I am building several 2010 infopath forms that are browser enabled. In one instance I need to be able to open a form from within another form and pass in a parameter.

    I've figured out how to build the url to the new form with the parameter value, and if I paste this url into a browser address bar it works fine.

    But now I need to figure out how to execute this link from a button within a form, opening in a new instance of IE. I figured to use the webbrowser control in the button event handler code, but it isn't working. Does anyone know how I might be able to do this.

    Sub Button1_Clicked(ByVal sender As Object, ByVal e As ClickedEventArgs)

    Dim sURL As String = "http://someSPsite/_layouts/FormServer.aspx?XsnLocation=http%3a%2f%2fsomeSPsite%2fFormServerTemplates%2fmyform.xsn%3FParamName%3D

    sURL &= "ParamValue"

    sURL &= "&SaveLocation=http%3a%2f%2fsomeSPsite%2f%2fFormLibrary&DefaultItemOpen=1"

    Dim ie As New WebBrowser()

    ie.Url = New Uri(sURL)

    End Sub

    I've tried setting IE.Visible to true and using IE.Navigate and IE.Show to no avail. I can see in the watch window that the IE object is instantiated, but there is no instance of iexplore.exe runnin in the task manager.

    Thanks for any insight into this.

    Steve

    Steve
  • 08-01-2011 11:49 PM In reply to

    Re: How to execute a hyperlink in event handler code

    Hi Steve,

    We've recently added the same command to qRules v3.3 which we're releasing in a couple weeks. Unfortunately, we couldn't get it to work in the browser either. Seems like a limitation.

    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.