ボタンクリックで呼び出される次のjs関数を持つaspxページがあります
<input type="button" onclick="calltemp1()" value="Temp1"/>
<script type="text/javascript">
function calltemp1() {
$("#Renderthisdiv").load("/Views/Templates/_Temp1.ascx");
}
</script>
my _Temp1.ascx ページが別のページをレンダリングする Temp1.ascx my _Temp1.ascx に含まれる
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
<div>
<%Html.RenderPartial("/Views/Templates/Temp1.ascx"); %>
</div>
プログラムを実行すると、「オブジェクトが必要です」という JavaScript ランタイム エラーが発生します。 この問題の解決を手伝ってください