Creating a hyperlink using code - InfoPath Dev
in

InfoPath Dev

Creating a hyperlink using code

Last post 01-23-2012 10:41 AM by Hilary Stoupa. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 01-20-2012 12:23 PM

    Creating a hyperlink using code

    I have been able to extract the URL from a file and I would like to display a clickable link in the form.

    I am not sure how to go about doing this.  I started to try and build a string using html, but that does not render the HTML in the form.

    The field that is populated is set to a hyperlink, but all that is rendered is the file location and it is not clickable.

    Dim

    Artwork As String

    Artwork =

    "<a href="""

              

    Dim endArtwork As String

    endArtwork =

    """>ArtworkFile</a>"

    If openFileDialog1.ShowDialog() = System.Windows.Forms.DialogResult.OK Then

    Dim uri As New Uri(openFileDialog1.FileName)

    Dim theLocation As String

    theLocation = uri.OriginalString

    ' Select URL field and set its value

    myNav.SelectSingleNode(

    "//my:test", Me.NamespaceManager). _

    SetValue(theLocation)

  • 01-23-2012 10:41 AM In reply to

    Re: Creating a hyperlink using code

    You can use a hyperlink in the form itself, which uses a data field for the address - then simply set the data field to the value needed in your code. You can also indicate a data field for the text. This is for IP 2003, but should give you the general idea.

    Hilary Stoupa

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