在我的HomeController我有一個索引動作,它通過RedirectToAction方法重定向到CustomerController的索引動作。在這種情況下,我不喜歡RedirectToAction修改顯示mysite.com/Customer的URL。是否有一些替代機制來執行重定向,這將允許我仍使用CustomerController的索引操作? public RedirectToRout
我有一個視圖模型 - public class MyViewModel
{
public int id{get;set;};
Public SomeClass obj{get;set;};
}
public class SomeClass
{
public int phone{get;set;};
public int zip{get;set;};
我有一個控制器在其中進行一些檢查。 如果由於某種原因或發生異常,我想在另一個控制器的另一個視圖中顯示錯誤消息。 這是我的異常處理程序的外觀 catch (Exception ex)
{
string infoMsg = "Delete the user and recreate is with an appropriate username of both a first