Venkatesh Pettem

Venkatesh Pettem

  • NA
  • 343
  • 9.6k

How to load data in view from controller of button click

Jan 10 2020 8:21 AM
in the below image when i clicked select button test id and test name data should be bind to code and name testbox respectively from controller. that means binding data to the same view.
 
from controller i'm passing it but, page not loading so data is not binding.
 
controller code:
  1. public async Task<ActionResult> TestMasterDetails(string TestID)  
  2. {  
  3. TestMasterModel _testMasterModel = new TestMasterModel();  
  4. TestMasterDetails _testMasterDetails = new TestMasterDetails();  
  5. _testMasterDetails = await GetTestMasterDetails(!string.IsNullOrEmpty(TestID) ? TestID : GetDefaultTestID());  
  6. _testMasterModel = _testMasterDetails.InformationModel;  
  7. return View("TestMasterDetails""MstTestMaster");  

i tried below return type also
 
return RedirectToAction("TestMasterDetails", "MstTestMaster");
 
 

Answers (3)