我需要显示从主视图中的局部视图中选择的项目的属性所以当我从局部视图中直接选择一个项目时,它的属性将在主视图中填充As we see in the picture when an item selected from the view on the left "which is the partial view" the main view will set the values of the selected item

在此处输入代码

在部分视图脚本中

`$`('input:radio[name=templateRadio]').change(function () {
        var idRad = `$`(this).val();
        alert(idRad);

        jQuery.post('/Mails/_getModelByIdfromPartialView', { id: idRad })

    });

控制器代码

public ActionResult _getModelByIdfromPartialView(int? id)
            {
                IUnitOfWork unitOfWork = new UnitOfWork(context);
                IMailingSendListRepository sentRepo = new MailingSendListRepository(context, unitOfWork);
                var model = sentRepo.getSentListById(id); 

                return Json(model,JsonRequestBehavior.AllowGet);
            }

用于获取数据的主索引脚本

`$`.getJSON('/Mails/getModelByIdfromPartialView',function (response) {
    alert("I am inside index json get");

        `$`("input[name=templateRadioIndexPage][value=" + 3 + "]").prop('checked', true);
        //$('select').chosen();
        `$`('select').val(2);
        `$`('select').trigger("chosen:updated");
        `$`('#inputSubject').val("Hello");
        `$`('#textEditorId').val("Hi this is a try for setting the content");

});