1. Back To Blog

How can we post a complete HTML form in JSON format?( ASP.NET JSON interview questions with answers)

To post a complete HTML form we need to call "serialize" function as shown in the below code. "form1" is a HTML form. The data given by the function can then be passed to the "post" method of Jquery."DisplayData" is a callback function to handle the output given by the server.

 

var Mydata = $("#form1").serialize();


$.post("/Customer/getCustomer", MyData, DisplayData);

 

 

We are thankful to questpond.com to provide this ASP.NET JSON interview question. Do view their 500 interview questions videos.

Shiv Prasad Koirala

Visit us @ www.questpond.com or call us at 022-66752917... read more

We are on Social