P
Paul Hale
I would like to pass back a string[] object from a c# web service to a client
browser JavaScript function. Each string in the array will contain HTML that
I will append to the already loaded page. I know I can pass back XML or JSON
but if possible I want to pass back HTML. Reason being that I have already
written a somewhat complicated utility function that builds my HTML strings
for me server side. If I pass back key values in either XML \ JSON I will
have to rewrite my utility function that builds the HTML in JavaScript and I
don’t want to have to maintain dual utility functions that do the same thing.
If this is not possible can I somehow encode the HTML in either XML or Json
and decode with a bit of javascript on the client?
Paul.
browser JavaScript function. Each string in the array will contain HTML that
I will append to the already loaded page. I know I can pass back XML or JSON
but if possible I want to pass back HTML. Reason being that I have already
written a somewhat complicated utility function that builds my HTML strings
for me server side. If I pass back key values in either XML \ JSON I will
have to rewrite my utility function that builds the HTML in JavaScript and I
don’t want to have to maintain dual utility functions that do the same thing.
If this is not possible can I somehow encode the HTML in either XML or Json
and decode with a bit of javascript on the client?
Paul.