界面js部分:
@using Newtonsoft.Json;var vData=@Html.Raw(JsonConvert.SerializeObject(ViewData));var loginId=vData["loginId"];var headUrl=vData["headUrl"];var userName=vData["userName"];如果直接在页面上显示
<input id="user-name" type="text" placeholder="2-15个字符" value="@ViewData["userName"]"/>controller部分:
public IActionResult PRofileEdit(long loginId, string headUrl, string userName) { ViewData["loginId"] = loginId; ViewData["headUrl"] = headUrl; ViewData["userName"] =userName; return View(); }新闻热点
疑难解答