Using a WebMethod, I get a value needed to create a HTML Table and populate it.
Once it’s done, I need the Table to be displayed.
Is it possible ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Can a web service return an HTML table? Yes. Should you do it that way? Probably not. Please consider ‘separating the concerns’ so that the service is responsible only for returning the data. Then the consumer of the data can format it as needed. One possible implementation would be for the service to return XML and the ‘presenter’ to transform it with XSLT into the desired Table. In the long run, the code will be easier to maintain and understand. (Trust me; I’ve seen a project that had 2,500+ lines of string concatenation that built an HTML string. NOT fun!) As an added bonus, the web service’s response will be much smaller.