我已經在我的控制,我想過去的2個參數如下:MVC Url.Action有兩個參數
url = Url.Action("ViewReq ", "ProgramT ", new System.Web.Routing.RouteValueDictionary(new { id = spid pgid = pid }), "http", Request.Url.Host);
當我認爲這一點,它顯示爲:
http://localhost/Masa/ProgramT/ViewReq/20036?pgid=00001
我喜歡它顯示爲:
http://localhost/Masa/ProgramT/ViewReq?id=20036&pgid=00001
如何修改UrlAction顯示此WA ÿ?
@Darvin季米特洛夫 - 如何修改樣品中Url.Action我有這麼上方它顯示爲http:// localhost/Masa/ProgramT/ViewReq?id = 20036&pgid = 00001,因爲這會給我絕對路徑。謝謝 – 2011-12-13 22:17:45