私は何かを試してみます.私は私の英語のために前もって謝罪します.
私のアクションコード;
public PartialViewResult showProduct()
{
var query = db.Categories.Where((c) => c.CategoryID == 4);
return PartialView("_EditCategory",query);
}
私のビューコード:
@using (Ajax.BeginForm(
"showProduct",
new AjaxOptions
{
HttpMethod = "GET",
InsertionMode = InsertionMode.InsertAfter,
UpdateTargetId = "result"
}))
{
<input type="submit" value="Get" />
}
<div id="result">
</div>
送信ボタン (値が取得される) を押すと、結果が返されますが、http://localhost:57616/Home/showProductのような別のページに返されますが、インデックス ページの結果 div に戻りたいです。
誰でも私を助けることができますか?