【问题标题】:View shall Display on the Same Page after clicking a Button单击按钮后视图应显示在同一页面上
【发布时间】:2012-08-15 06:47:39
【问题描述】:
单击此按钮后,我使用它来显示视图,但不显示部分视图。
查看:
<%=Ajax.ActionLink("See List", "List of Cakes", new AjaxOptions { UpdateTargetId = "theList" })%>
<div id="theList"></div>
我添加了不显眼的脚本,在 web.config 中确认了它,缺少什么?
【问题讨论】:
标签:
asp.net
ajax
asp.net-mvc-partialview
【解决方案1】:
从一位同事那里得知,我不需要从 web.config 中检查某些内容,因为 IDE 会自动添加/删除添加的脚本。
以下是添加的脚本:
<script src="../../Scripts/MicrosoftAjax.js" type="text/javascript"></script>
<script src="../../Scripts/MicrosoftMvcAjax.js" type="text/javascript"></script>