ASPForums.Net RSS Feedhttp://www.aspforums.net/Handlers/RSS.ashxLatest additions to the content that appears on ASPForums.Net(c) 2019 www.aspforums.com. All rights reserved.Return HTML response from Web Service in ASP.Net<p>Hi <a class="username" rel="iammann"> iammann</a>,</p> <p>Creating a web method which returns a string value that contain the HTML string.</p> <p><strong><span style="text-decoration: underline;">Example</span></strong></p> <pre class="brush: csharp">[WebMethod] public string GetHTML() { return &#34;&lt;HTML&gt;&lt;TITLE&gt;...&#34;; }</pre> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/131244/Return-HTML-response-from-Web-Service-in-ASPNet/https://www.aspforums.net:443/Threads/131244/Return-HTML-response-from-Web-Service-in-ASPNet/Tue, 03 Apr 2018 04:21:33 GMTReturn HTML response from Web Service in ASP.Net<p>thanks for the anwers .but its returning an XML node.i just want to return simple HTML&nbsp; i dont want XML nodes in the response.</p>https://www.aspforums.net:443/Threads/131244/Return-HTML-response-from-Web-Service-in-ASPNet/https://www.aspforums.net:443/Threads/131244/Return-HTML-response-from-Web-Service-in-ASPNet/Wed, 04 Apr 2018 06:09:28 GMTReturn HTML response from Web Service in ASP.Net<p>Will you please provide sample html that you want to return.</p>https://www.aspforums.net:443/Threads/131244/Return-HTML-response-from-Web-Service-in-ASPNet/https://www.aspforums.net:443/Threads/131244/Return-HTML-response-from-Web-Service-in-ASPNet/Wed, 04 Apr 2018 07:08:45 GMTReturn HTML response from Web Service in ASP.Net<p>&nbsp;</p> <pre class="brush: html">&lt;table width=&#34;100%&#34;&gt; &lt;tbody&gt;&lt;tr&gt; &lt;td colspan=&#34;2&#34; style=&#34;border-bottom: 1px dotted #862D01; color: #862D01; font-size: 13px; font-weight: bold;&#34;&gt;Power Generation as on : &lt;b&gt;&lt;/b&gt; &lt;span id=&#34;txtDateofEntry&#34;&gt;05/04/2018&lt;/span&gt; &amp;nbsp; at &lt;span id=&#34;lblTimeEntry&#34; style=&#34;float: right&#34;&gt;07:00AM&lt;/span&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class=&#34;style4&#34;&gt;Anpara &lt;/td&gt; &lt;td style=&#34;font-size: 12px; color: White&#34; align=&#34;right&#34;&gt; &lt;span id=&#34;txt_Anpara&#34;&gt;2214&lt;/span&gt;&amp;nbsp;MW &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class=&#34;style4&#34;&gt;Obra &lt;/td&gt; &lt;td style=&#34;font-size: 12px; color: White&#34; align=&#34;right&#34;&gt; &lt;span id=&#34;txt_Obra&#34;&gt;417&lt;/span&gt;&amp;nbsp;MW &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class=&#34;style4&#34;&gt;Panki &lt;/td&gt; &lt;td style=&#34;font-size: 12px; color: White&#34; align=&#34;right&#34;&gt; &lt;span id=&#34;txt_Panki&#34;&gt;0&lt;/span&gt; MW &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class=&#34;style4&#34;&gt;Parichha &lt;/td&gt; &lt;td style=&#34;font-size: 12px; color: White&#34; align=&#34;right&#34;&gt; &lt;span id=&#34;txt_Parichha&#34;&gt;586&lt;/span&gt; MW &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class=&#34;style4&#34;&gt;Harduaganj &lt;/td&gt; &lt;td style=&#34;font-size: 12px; color: White&#34; align=&#34;right&#34;&gt; &lt;span id=&#34;txt_Harduganj&#34;&gt;202&lt;/span&gt; MW &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class=&#34;style4&#34;&gt;Total&amp;nbsp;Generation &lt;/td&gt; &lt;td style=&#34;font-size: 12px; color: White&#34; align=&#34;right&#34;&gt; &lt;span id=&#34;lbl_sum&#34;&gt;3419&lt;/span&gt; MW &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class=&#34;style4&#34;&gt;Thermal Backing&lt;/td&gt; &lt;td style=&#34;font-size: 12px; color: White&#34; align=&#34;right&#34;&gt; &lt;span id=&#34;lbl_pwrBacking&#34;&gt;1344&lt;/span&gt; MW&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class=&#34;style2&#34;&gt;&amp;nbsp; &lt;/td&gt; &lt;td&gt; &lt;span id=&#34;lblMessage&#34;&gt;&lt;/span&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class=&#34;style4&#34;&gt;&amp;nbsp; &lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class=&#34;style4&#34;&gt;&amp;nbsp; &lt;/td&gt; &lt;td&gt;&amp;nbsp; &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;</pre> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/131244/Return-HTML-response-from-Web-Service-in-ASPNet/https://www.aspforums.net:443/Threads/131244/Return-HTML-response-from-Web-Service-in-ASPNet/Wed, 04 Apr 2018 22:05:56 GMTReturn HTML response from Web Service in ASP.Net<p>WebService always returns data wrapped in SOAP XML and hence if you don't want that. Use a WCF Service.</p>https://www.aspforums.net:443/Threads/131244/Return-HTML-response-from-Web-Service-in-ASPNet/https://www.aspforums.net:443/Threads/131244/Return-HTML-response-from-Web-Service-in-ASPNet/Wed, 04 Apr 2018 23:38:26 GMT