亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

如何將部分視圖呈現為字符串

如何將部分視圖呈現為字符串

慕工程0101907 2019-10-11 14:09:46
我有以下代碼:public ActionResult SomeAction(){    return new JsonpResult    {        Data = new { Widget = "some partial html for the widget" }    };}我想對其進行修改,以便可以public ActionResult SomeAction(){    // will render HTML that I can pass to the JSONP result to return.    var partial = RenderPartial(viewModel);     return new JsonpResult    {        Data = new { Widget = partial }    };}這可能嗎?有人可以解釋一下嗎?注意,我在發布解決方案之前編輯了問題。
查看完整描述

3 回答

  • 3 回答
  • 0 關注
  • 407 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號