Passing Named Parameters to POST action and getting JSON array – Programmatically

Yesterday, I was approached by one of my teammate where he was facing an issue with getting JSON response from an ASP.NET MVC action.  He was working on a Console Application where he wanted to get the list of products from another internal ASP.NET MVC website. This ASP.NET MVC action was taking category (a string…


Creating and Submitting Form on Fly using Javascript

var form = document.createElement(“form”); form.setAttribute(“method”, “post”); form.setAttribute(“action”, “default.aspx”); form.setAttribute(“target”, “_blank”); var hiddenField = document.createElement(“input”); hiddenField.setAttribute(“name”, “search”); hiddenField.setAttribute(“value”,”product1,product2″ ); hiddenField.setAttribute(“type”, “hidden”); form.appendChild(hiddenField); document.body.appendChild(form); form.submit();