Als «url.action» getaggte Fragen

4
URL.Aktionsparameter?
In der Liste Controller habe ich, public ActionResult GetByList(string name, string contact) { var NameCollection = Service.GetByName(name); var ContactCollection = Service.GetByContact(contact); return View(new ListViewModel(NameCollection ,ContactCollection)); } Auf der ASPX-Seite rufe ich an, <a href="<%:Url.Action("GetByList","Listing" , new {name= "John"} , new {contact="calgary, vancouver"})%>"><span>People</span></a> Ich habe ein Problem im ASPX-Code ... Ich …

2
Url.Action setzt ein & amp; Wie kann ich das in meiner URL lösen?
Ich möchte die Variablen itemId und entityModel an ActionResult CreateNote senden: public ActionResult CreateNote( [ModelBinder(typeof(Models.JsonModelBinder))] NoteModel Model, string cmd, long? itemId, string modelEntity) mit diesem Javascript: Model.meta.PostAction = Url.Action("CreateNote", new { cmd = "Save", itemId = itemId, modelEntity = modelEntity}); Die gesendete URL lautet jedoch localhost:1304/Administration/blue/en-gb/Entity/CreateNote?modelEntity=Phrase&itemId=44 Ich will etwas senden …
Durch die Nutzung unserer Website bestätigen Sie, dass Sie unsere Cookie-Richtlinie und Datenschutzrichtlinie gelesen und verstanden haben.
Licensed under cc by-sa 3.0 with attribution required.