我想打印存储在控制器对象中的值。我试图寻找答案,但我没有找到正确的答案。请帮忙
//my code in control
public ActionResult PrintOutput()
{
ModalClass myObject = new ModalClass
myObject.load(str);
ViewBag.myOject = myOject.ToString();
return View("PositionPrint");
}
//In view page I have created a **PartialView**. Inside partial view I
// have given below code alone
@Html.Raw(@ViewBag.myOject)