function AppViewModel() { $('#form').submit(function(){ $.ajax( { url : '...', data:JSON.stringify(data), method : 'GET', success: function(date) { //you need to append the data to gridview for (var i = 0; i < 10; i++) { $("#text").append("<table><tbody><tr><td>" + date[i].Text1 + "</td><td>" + date[i].Text2 + "</td></tr></tbody></table>"); } }}); })
<form id="form" method="get" > <table > <tr><td>First name</td><td> <input type="text" class="inputs" id="first"/></td></tr> <tr><td>Last name</td><td> <input type="text" class="inputs" id="Text1" /></td></tr> <tr><td>Dob</td><td><input type="text" id="datepicker"/></td></tr> <tr><td>Description</td><td> <textarea rows="5" cols="17" class="inputs" id="Text3" ></textarea></td></tr> <tr><td><input type="button" value="submit" onclick="AppViewModel()" id="text" /></td></tr> </table> </form> <div id="date"></div>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)