快速的新手問題。我不知道爲什麼我的Html.ActionLink這相當於這「查看源文件」Html.ActionLink沒有形成我想要的格式的鏈接
<a href="/Customer/CustomerSave?custid=1104">Save</a>
我的HTML幫助是這樣的:
<%: Html.ActionLink("Save", "CustomerSave","Customer",new {custid = 101 })%>
我得到一個「未找到資源」嘗試訪問我的控制器時出錯:
[HttpPost]
public ActionResult CustomerSave(int custid)
{
........
}
顯然,錨點結構不正確。我已閱讀其他帖子並嘗試其他選項,但我不完全瞭解發生了什麼。我所要做的就是在我的客戶控制器中執行操作(「CustomerSave」)。
我在做什麼錯?
你不是張貼到服務器的信息,以節省您的客戶?數據來自哪裏? –