Câu hỏi được gắn thẻ «url.action»

4
Tham số Url.Action?
Trong bộ điều khiển danh sách tôi có, public ActionResult GetByList(string name, string contact) { var NameCollection = Service.GetByName(name); var ContactCollection = Service.GetByContact(contact); return View(new ListViewModel(NameCollection ,ContactCollection)); } Trong trang ASPX tôi gọi, <a href="<%:Url.Action("GetByList","Listing" , new {name= "John"} , new {contact="calgary, vancouver"})%>"><span>People</span></a> Tôi gặp sự cố trong mã ASPX …

2
Url.Action đặt một & amp; trong url của tôi, làm cách nào để giải quyết vấn đề này?
Tôi muốn gửi các biến itemId và entityModel đến ActionResult CreateNote: public ActionResult CreateNote( [ModelBinder(typeof(Models.JsonModelBinder))] NoteModel Model, string cmd, long? itemId, string modelEntity) với javascript này: Model.meta.PostAction = Url.Action("CreateNote", new { cmd = "Save", itemId = itemId, modelEntity = modelEntity}); Tuy nhiên, url được gửi là localhost:1304/Administration/blue/en-gb/Entity/CreateNote?modelEntity=Phrase&itemId=44 tôi muốn gửi …
Khi sử dụng trang web của chúng tôi, bạn xác nhận rằng bạn đã đọc và hiểu Chính sách cookie và Chính sách bảo mật của chúng tôi.
Licensed under cc by-sa 3.0 with attribution required.