2013-07-01 5 views

답변

0
This got solved. We can use JQuery to achive tgis 

View 
-------- 

    var url = '@Url.Action("YourActionName", "YourControllerName")'; 
    $.post(url, 'ID=' + radio button Id , function (data) { 
     $('#txtBox1').val(data.Key1);   
     $('#txtBox2').val(data.Key2); 
     $('#txtBox3').val(data.Key3); 
} 

Controller 
---------- 
Inside your action method , construct a JSON string as showed below and send back to JQuery Function. 

    var dataTest = new { "Key1"= "value1","Key2"= "value2", "Key3"= "value3" }; 
    return Json(dataTest, JsonRequestBehavior.AllowGet); 
0

한 가지 방법은 컨트롤러 메서드에 값을 게시하고 저장 한 다음 값이있는 새 뷰를 다시 렌더링하는 것입니다.

+0

부품 저장이 완료되었습니다. 그런 다음 사용자가 페이지를 방문하고 특정 라디오 버튼을 클릭 할 때마다 각각의 값이 렌더링되어야합니다. 이를 위해 별도의보기를 만들어야합니까? – user2537735