I have an ASP.NET MVC3 app and when the user clicks on my anchor tag, I want to send 3 pieces of data to an action:
<a onclick='editDescription(<#= DocID,FileName,Description #>)'></a>
This is the javascript to call my action:
function editDescription(docId,fileName,description) {
var url = "@Url.Content("~/OrderDetail/_EditDescription/")" + docId+'/'+
fileName + '/' + description;
//do the rest}
My action:
public ActionResult _EditDescription(string id,string filename, string descritpion)
The pieces im concerned about are FileName and Description because these can be loooooong and i dont want a url to appear like so:
http://localhost/OrderDetail/_EditDescription/123/some long filename.pdf/this is a long description for the name
How can i send across my data to my action without having to send it like a query string? Thanks