I've read various threads about how to get an actionlink in a column in an AJAX grid and have successfully implemented that portion of it. However, in the case of this link I need it to use HttpPost to the server. The purpose of the link is to allow download of a document. However, we don't want parameters visible in the querystring that identify the particular document as it is in the database. So I have the Action which is called with the document id via POST retrieve the document, store it in session and return a GUID linked to that session variable along with the URL to the retrieval page. I then submit a dynamically created form which goes to that retrieval page, passing it the GUID, and gets the document for download.
To that end I created a function to attach to a classed link and use JQuery to post it to the server. It works perfectly for an ActionLink outside the AJAX bound grid but inside the grid it doesn't call that javascript function, instead it attempts to call the Action via Get which is disallowed so I get a 404 error. Is there some other way to tell the ActionLink in the grid to use the javascript function? I would appreciate any help you could provide.
I've attached a text file with the javascript function and the ActionLink and Grid declarations.
To that end I created a function to attach to a classed link and use JQuery to post it to the server. It works perfectly for an ActionLink outside the AJAX bound grid but inside the grid it doesn't call that javascript function, instead it attempts to call the Action via Get which is disallowed so I get a 404 error. Is there some other way to tell the ActionLink in the grid to use the javascript function? I would appreciate any help you could provide.
I've attached a text file with the javascript function and the ActionLink and Grid declarations.