I am having trouble with building a URL with a query string. I have this code that does what I want it to:
formatoptions: { baseLinkUrl: '@Url.Action("UserInformation", "UserList")', idName: 'Id' }
This makes the proper URL (/UserInformation?Id=4)
This is the section that I am having trouble with, basically trying to replicate what is above, but the syntax is different and I am not sure what's wrong.
results.Add(New SearchResult With {.Link = Url.Action("UserInformation", "UserList", New With {.id = use.Id}), .Text = use.ToString, .Type = "User"})
This make the URL a bit off (/UserInformation/4), it causes problems when redirecting from that page. I'd like to edit this to replicate the proper URL string.
This is a bit of a hack that we figured out to make it work..but I'd like to do it 'properly' if possible
results.Add(New SearchResult With {.Link = Url.Content("~/UserList/UserInformation?Id=" & use.Id), .Text = use.ToString, .Type = "User"})