Showing image in browser

S

sam

Hi all,
I've got a problem on showing the filled form (xml file) from infopath on a
web browser. Theoretically, I can apply a xsl on the filled form, then show
it on a browser as a simple web page.
However, when I insert an image into a rich text field in the form, the
image will be ember into the xml file, I can show the form with the image
again by the infopath. But how can I show it in a brower by applying a xsl?
 
B

Brian Teutsch [MSFT]

The best way to do this, since the XML will continue to live on the server,
is to use ASP.NET to repoint the src attributes of the embedded image data.
Then use ASP.NET to stream the decoded data from the original XML file. It
looks like this.

<img src="mso-inline/GUID" xd:inline="base64Data" />
becomes
<img src="mypage.aspx?src=GUID&page=myDoc.xml" />

In ASP.NET, it's quite easy to decode base64 data, so you need only a tiny
amount of code to fetch the original XML and do the decoding.

Brian
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top