在我的.aspx页面中我有这样的东西:
<select id="seltemp" onchange="calltemp()">
<option value="0" selected="selected">Select Template</option>
<option value="1">Template1</option>
<option value="2">Template2</option>
<option value="3">Template3</option>
<option value="4">Html Template</option>
</select>
<script type="text/javascript">
function calltemp() {
document.getElementById('datashow').innerHTML = "";
var id = (document.getElementById('seltemp').value);
if (id != 0) {debugger;
$.get("/Templates/Select/" + id + "/", function(result) {
$("#Renderthisdiv").html(result);
});
}
}
</script>
并在TemplatesController中
public ActionResult Select(int id)
{
......
......
return View("/Views/Templates/Temp1.htm");
}
请帮我将Temp1.htm页面渲染成“Renderthisdiv”div
答案 0 :(得分:1)
return File("~/Views/Templates/Temp1.htm", "text/html");
- 修改