I want to search a specific record and fill textboxes of mvc3 by searched result...
I'm using MVC Razor view Engine and unable to fill textboxes of the MVC3 by searched result generated from the database(sql Server 2008)
Thank's
With Regards
Pradeep Patel (Pune)
Loading


Jaganathan BantheswaranRank #170 · 14.1K reputationPosted Dec 11, 2013, 6:54 PM EST
Pradeep Patel46 reputationPosted Dec 11, 2013, 7:33 PM EST
I've uploaded an image wherein Emp Id textbox have to enter an Eemp Id like Emp101 and if i click on search button It should search a record and if record is available then all textboxes of related record should be fill out.
Please view uploaded Image first..
I don't know how to code for searching in MVC3
Thanx And Regards
Pradeep Patel
8483094947
Jaganathan BantheswaranRank #170 · 14.1K reputationPosted Dec 11, 2013, 8:16 PM EST
$('#btnSearch').on('click', function(){
$.ajax({
url: "@(Url.Action("Action", "Controller"))",
type: "POST",
data: { id: $('#empID').val()},
cache: false,
async: true,
success: function (result) {
// fill text box here
}
});
});
Pradeep Patel46 reputationPosted Feb 26, 2014, 7:02 PM EST
This is my View
@model MvcApplication2.Models.EmpModel
@ViewBag.Message
My controller fetches records properly but I'm unable to fill fetched records in textbox es..
Please check above code ...
Pradeep Patel46 reputationPosted Mar 2, 2014, 11:19 PM EST