c# - How to get item detail after choosing in autocomplete textbox using jquery? -
how more detail values database after choosing field using viewbag below form :
<div class="form-group"> <label class="control-label col-md-2">employe code</label> <div class="col-md-10"> @html.dropdownlist("id", (ienumerable<selectlistitem>)viewbag.strcontact, new { @class = "form-control select2" }) @html.validationmessagefor(model => model.id, "", new { @class = "text-danger" }) </div> </div> <div class="form-group"> @html.labelfor(model => model.name, htmlattributes: new { @class = "control-label col-md-2" }) <div class="col-md-10"> @html.editorfor(model => model.name, new { htmlattributes = new { @class = "form-control" } }) @html.validationmessagefor(model => model.name, "", new { @class = "text-danger" }) </div> </div> <div class="form-group"> @html.labelfor(model => model.phone, htmlattributes: new { @class = "control-label col-md-2" }) <div class="col-md-10"> @html.editorfor(model => model.phone, new { htmlattributes = new { @class = "form-control" } }) @html.validationmessagefor(model => model.phone, "", new { @class = "text-danger" }) </div> </div> <div class="form-group"> @html.labelfor(model => model.address, htmlattributes: new { @class = "control-label col-md-2" }) <div class="col-md-10"> @html.editorfor(model => model.address, new { htmlattributes = new { @class = "form-control" } }) @html.validationmessagefor(model => model.address, "", new { @class = "text-danger" }) </div> </div>
if choosing employee code in database getting name, phone address.
thank you.
Comments
Post a Comment