Which is made clickable via: $("#downloadLink"). Public override void ExecuteResult(ControllerContext context)Ĭ() Ĭ = ContentType Ĭ("content-disposition",Ĭ(Content) Here's the Binar圜ontentResult class: public class Binar圜ontentResult : ActionResult Throw new ArgumentException("Invalid file name or file does not exist!") ĬontentType = "application/octet-stream",Ĭontent = System.IO.File.ReadAllBytes(fullName) String fullName = Path.Combine(GetBaseDir(), fileName) Here's the action method: public ActionResult Download(string fileName) I guess I have to do something with the return value, but I don't know what or how. Now, I can call the download action method just fine, but nothing happens. NET Framework 3. Quick Details System Requirements Instructions Popular Downloads Product Families 01 Microsoft. BackNext ASP.NET MVC 2 provides a new Model-View-Controller (MVC) framework on top of the existing ASP.NET 3.5 SP1 runtime. I found an explanation of doing the download through an action method, but unfortunately the example still had actionlinks. Microsoft Download Manager is free and available for download now. At the moment I have a simple just for testing. I plan to use an image or the like and make it clickable by using jQuery. I want to enable file download in my MVC application, without simply using a hyperlink.
0 Comments
Leave a Reply. |