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