Tutorial: How To Return Html In Json Response Using Asp.net And Jquery - Programming - Nairaland
Nairaland Forum › Science/Technology › Programming › Tutorial: How To Return Html In Json Response Using Asp.net And Jquery (6142 Views)
1 Reply
| Tutorial: How To Return Html In Json Response Using Asp.net And Jquery by Syma(op): 1:42am On Nov 01, 2010 |
I just blogged on how to write a generic jquery function to handle ajax request that return html in json response. It's a good trick that I believe will find its way in your code library. What I blogged about in this post is how to return html content in json response type. The useful thing about this technique is that you get to write your html once in a partial view, which you can then render using full page or ajax request, you can also use the same ajax request with different unrelated url that returned different types. This saves you from writing too many codes for different kind of request and reduces view duplication between server and client side. The final result [img]http://1.bp..com/_xtoz_qjBJqk/TM3Ohod-DqI/AAAAAAAAAA4/yylH_MZc1E0/s1600/return-html-as-json.jpg[/img] You can read the blog and download the source code here http://emekaemego..com/2010/11/how-to-return-html-in-json-response.html |
| Re: Tutorial: How To Return Html In Json Response Using Asp.net And Jquery by Nobody: 7:44am On Nov 01, 2010 |
Dude i really Like your articles as it ignites my interest in .NET, |
| Re: Tutorial: How To Return Html In Json Response Using Asp.net And Jquery by Syma(op): 9:19pm On Nov 01, 2010 |
@pc guru Thanks, I really want to be posting more frequently, but I'm finding it hard to squeeze our time. I'm on new one now, will post it when am done. |
List Of All States With Local Governments In Nigeria In JSON, PHP And SQL Format • How Do I Create An API For A Website Or Blog In JSON Format. • Asp.net And Php Which Is Better • 2 • 3 • 4
Calculating Nse's All Share Index And Market Capitalisation • English Language Programming Challenge • Design A Module Program