@{
Layout = null;
}
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<title>Update</title>
<script src="~/Content/Scripts/jquery-3.1.1.js"></script>
<link href="~/Content/css/bootstrap.css" rel="stylesheet" />
<script src="~/Content/Scripts/jquery-form.js"></script>
<script src="~/Content/ueditor/ueditor.config.js"></script>
<script src="~/Content/ueditor/ueditor.all.js"></script>
<script src="~/Content/ueditor/lang/zh-cn/zh-cn.js"></script>
</head>
<body>
<div>
<table>
<tr>
<td>产品标题</td>
<td>
<input type="text" id="ProductTitle"/>
</td>
</tr>
<tr>
<td>排序</td>
<td>
<input type="text" id="OrderBy"/>
</td>
</tr>
<tr>
<td>市场价格</td>
<td>
<input type="text" id="Price"/><span>元</span>
</td>
</tr>
<tr>
<td>图片上传:</td>
<td>
<input type="file" name="_Fr" multiple />
<input type="button" value="开始上传" onclick="UpLoad()" class="btn btn-info" />
<input type="button" value="继续添加" onclick="UpLoad()" class="btn btn-info" />
<input type="hidden" name="Files" id="Hid_Files" />
<div id="ImgShow">
</div>
</td>
</tr>
<tr>
<td>上传时间</td>
<td>
<input type="date" id="BeginTime"/>
</td>
</tr>
<tr>
<td>内容:</td>
<td>
<area name="Content" id="Content" style="800px;height:300px;"/>
</td>
</tr>
<tr>
<td><input type="button" value="提交" class="btn-danger btn-default" /></td>
<td><input type="button" value="取消" class="btn-danger btn-default" /></td>
</tr>
</table>
</div>
</body>
</html>
<script>
var ue = UE.getEditor('Content');
$(function () {
$.ajax({
url:" http://localhost:2329/api/default/fan?ID="+@Convert.ToInt32(ViewBag.ID),
type: "get",
success:function(data)
{
$("#ProductTitle").val(data["ProductTitle"]),
$("#ImgUrl").prop("src",data["ImgUrl"]),
$("#OrderBy").val(data["OrderBy"]),
$("#Price").val(data["Price"]),
$("#BeginTime").val(data["BeginTime"]),
$("#Content").val(data["Content"])
}
})
})
</script>