In the controller listing, I have
public ActionResult GetByList(string name, string contact) { var NameCollection = Service.GetByName(name); var ContactCollection = Service.GetByContact(contact); return View(new ListViewModel(NameCollection ,ContactCollection)); }
On an aspx page, I call
<a href="<%:Url.Action("GetByList","Listing" , new {name= "John"} , new {contact="calgary, vancouver"})%>"><span>People</span></a>
I have a problem in ASPX code ... I can pull the entries for the name john. but when I give contact = "calgary, vancouver", the webpage goes into error.
How can I call two parameters in Url.Action. I tried the following, but that seems wrong too.
<a href="<%:Url.Action("GetByList","Listing" , new {name= "John" , contact= " calgary, vancouver" })%>"><span>People</span></a>
user787788 Jun 08 '11 at 12:29 2011-06-08 12:29
source share