Sunday, March 11, 2012

passing html content from service to client and displaying not working

Does it work if you dynamically insert that HTML but from a static string instead of a service method result? e.g.

document.getElementById("tblResults").innerHTML = "[YOUR HTML AS A STATIC STRING]";

If you get the same problem, then at least we know it has nothing to do with the web service call.


The innerHTML property is readonly for a table element.

It should work for a div.

ok i found the problem, didnt even think that i can not use controls which is what i was using for a panel and an image when passing back my html dynamically. I got rid of the panel and changed the asp:image to img and what do u know it worked. And as for the table being read only, i was passing a complete table into a div tag which works now. Woohoooo

No comments:

Post a Comment