in

InfoPath Dev

Rich text in ado.net dataset

Last post 09-04-2008 06:57 AM by run000. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 07-31-2008 09:25 AM

    • run000
    • Not Ranked
    • Joined on 04-02-2008
    • Posts 5

    Rich text in ado.net dataset

    Hi everyone,

    I'm trying to show xhtml text in a expression box (mostly I need show links), this text is provided from a web service in a ado.net dataset. The problem is that the data is displayed as plain text. I was trying with many ways, and using this post like reference but I gave up. Can you help me?

    Thanks for your job.

    PD. I'm using Infopath 2003 (jscript code) and VS 2005 (c#)

  • 09-04-2008 06:57 AM In reply to

    • run000
    • Not Ranked
    • Joined on 04-02-2008
    • Posts 5

    Re: Rich text in ado.net dataset

    Hi again,

    Some weeks ago I found out the solution to this issue, I hope it can be helpful to someone. I coded the solution creating a new XHTML field in the main data source, and throwing an OnAfterChange event In thee original field (secondary data source). In this function I used this code:

    var answDiv = "<div xmlns=\"http://www.w3.org/1999/xhtml\">" + xmlString+ " "</div>";
    var ansXMLDoc = XDocument.CreateDOM();
    ansXMLDoc.loadXML(answDiv);        
    node.appendChild(ansXMLDoc.documentElement.cloneNode(true));

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