I have a helper method inside my App_Code folder which returns some html to be displayed on the page. How can I do jQuery/AJAX request to call that method (passing an int as a parameter) and have the HTML returned so I can display it on the page?
I’ve been looking everywhere and have absolutely no idea where to even start. I’d appreciate any help at all.
Add another page that uses the Helper to render HTML, and provide a value via the AJAX call. For example, you might have a page called RenderHelper.cshtml:
Then in your calling page, use the jQuery load function: