ルート:
routes.MapRoute(
"Customer_widget",
"customer/widget/{action}/{id}",
new { controller = "Customer_Widget", id = UrlParameter.Optional });
テスト URL1: (動作します)
customer/widget/contact_list/1-1004-SC-0-0-0-0-0-0-Supplier-Supplier----0-0-0-0-Year-Calendar-0-Home-0
テスト URL2: (動作しません)
customer/widget/contact_list/1-1004-SC-0-0-0-0-0-0-Supplier-Supplier--6%2f1%2f2013-7%2f6%2f2013--0-0-0-0-Year-Calendar-0-Home-0 (does not work)
上記の 2 つの URL の睾丸があります。最初の URL は適切な場所に移動します。しかし、2 番目の URL が道に迷いました...何が原因なのかわかりません...昼間の部分 6%2f1%2f2013-7%2f6%2f2013 が何らかの問題を引き起こしていると思いますが、よくわかりませんそれは何ですか。
カスタマーコントローラー
public ActionResult Index(string id = null)
{
string temp = "~/customer/widget/contact_list/" + this.objURL.ToString();
return Redirect("~/customer/widget/contact_list/" + this.objURL.ToString());
}
Customer_WidgetController
public ActionResult Contact_list(string id = null)
{
return PartialView("_contact_list",Customer_Widget.Contact_list.Load(id, ref errors));
}
フロー CustomerController ->(マップ ルートによる) Customer_WidgetController