Webservice return HTML?

Last post 05-13-2008 12:20 PM by Elmar. 1 replies.

Sort Posts:

  • Webservice return HTML?

    05-13-2008, 11:52 AM

    So Ive written AJAX functions to avoid using update panels before. But i did this by writing all the JS myself, and just learned about webservices that can do the same thing that used to take a bunch of JS. One thing I liked about using my JS solution was that I could write a dynamic page in html and return it as the innerHtml of a div to update the current page I am on. All the examples I have see for webservices show just returning simple strings like names and greetings. I was wondering how I can return a set of html from a webservice. Do I just write the html in the asmx file, or do I ahve to write a bunch of Response.Write code in my code behind.

    I like that I can have one service with multiple methods to call to return different data, but if I put html in the asmx file, how do i get it to only return the parts that I want?

     Thanks

     

    Please remember to click "Mark as Answer" on this post if it helped you.
  • Re: Webservice return HTML?

    05-13-2008, 12:20 PM
    Answer
    • Loading...
    • Elmar
    • Joined on 08-09-2006, 5:27 AM
    • Posts 33

    Basically you don´t need a Webservice for this but a normal aspx page. It is actually strange that ASP.NET AJAX hasn´t got an own wrapper for this.

    Have look in this thread 

Page 1 of 1 (2 items)