I am trying to pass a variable from a Hyperlink into an InfoPath 2010 Filler Form. My e.InputParameters does not appear to be getting the value from my hyperlink. I am guessing that I am missing some piece of code still but not sure. When the form loads I aways have the else value in my text box. Any help would be great.
Here is my hyperlink code: http://portal.loram.com/IntSup/accounting/RedirectFile/Invoicing.xsn?docid=FR-C10-BCCC-9JTTL5
Imports
Microsoft.Office.InfoPath
Imports
System
Imports
System.Web
Imports
System.Xml
Imports
System.Xml.XPath
Imports
System.Collections
Imports
System.Windows.Forms
Imports
System.IO
Imports
System.Uri
Imports
mshtmlNamespace Invoicing Public Class FormCode
' Member variables are not supported in browser-enabled forms.
' Instead, write and read these values from the FormState
' dictionary using code such as the following:
'
'Private Property _memberVariable() As Object
' Get
' _memberVariable = FormState("_memberVariable")
' End Get
'Set(ByVal value As Object)
' FormState("_memberVariable") = value
' End Set
'End Property
' NOTE: The following procedure is required by Microsoft InfoPath.
' It can be modified using Microsoft InfoPath.Private Sub InternalStartup(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Startup AddHandler EventManager.FormEvents.Loading, AddressOf FormEvents_Loading
End SubPublic Sub FormEvents_Loading(ByVal sender As Object, ByVal e As LoadingEventArgs)
Dim mainDS As XPathNavigator = MainDataSource.CreateNavigator()Dim vdocid As String = String.Empty
If e.InputParameters.TryGetValue("docid", vdocid) ThenmainDS.SelectSingleNode("/dfs:myFields/my:vdocid", _
NamespaceManager).SetValue(vdocid)
ElsemainDS.SelectSingleNode("/dfs:myFields/my:vdocid", _ NamespaceManager).SetValue("FR-C11-BCCC-9FP2KR")
End If
End SubEnd Class
End
Namespace