Use line feeds in text variable; set node value in VB.Net - InfoPath Dev
in

InfoPath Dev

Use line feeds in text variable; set node value in VB.Net

Last post 10-12-2009 05:23 PM by Jimmy. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 10-12-2009 01:48 PM

    Use line feeds in text variable; set node value in VB.Net

    My task:  Programatically build a text variable that includes line feeds, then save it to a text node in my InfoPath form.

    My problem:  When I use [navigator].SelectSingleNode("[node]", NamespaceManage).SetValue, the process strips the line feeds out of my variable.  The resulting node value is simply a single line of text which wraps in the InfoPath form field.

     I've done due diligence searching on my own.  I get the feeling I'm not phrasing my search correctly...

     Thanks for any help.

     

     

  • 10-12-2009 03:13 PM In reply to

    Re: Use line feeds in text variable; set node value in VB.Net

    Hi GMLear,

    ... please use the text "\r\n" as the 'line feed' ... for example:

    [navigator].SelectSingleNode("[node]", NamespaceManage).SetValue(string.Concat("First line","\r\n","Second line","\r\n","Third line")

    Hope that helps.

    Regards,

    Karsten
    Filed under:
  • 10-12-2009 05:23 PM In reply to

    Re: Use line feeds in text variable; set node value in VB.Net

     Make sure that your text box is set to be "Multi-line" in its properties too.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.