我有一个制度,可以把一个旁观阵列(不了解其pdf、txt或 doc)提供给我的可下载档案。 如今,通常在伙伴关系中。 NET MVC 我希望这样做。
return File(labTestResult.File, "application/pdf");
之所以容易,是因为我知道档案类型是什么。 既然档案类型可能是什么,那么能否将档案下载到适当的格式?
我有一个制度,可以把一个旁观阵列(不了解其pdf、txt或 doc)提供给我的可下载档案。 如今,通常在伙伴关系中。 NET MVC 我希望这样做。
return File(labTestResult.File, "application/pdf");
之所以容易,是因为我知道档案类型是什么。 既然档案类型可能是什么,那么能否将档案下载到适当的格式?
Asp.net MVC非常容易,因此,如果你需要以不同的方式在答复中发出任何信息,即你可以撰写一份行动说明,供你使用,而不必具体说明奇梅类型,但确实不建议这样做。
如果你也能够确定使用该守则的习俗行动结果,那么你的控制器代码就成为:return AutoMimeFile(labResult.File);
。
我确信,这样做确实是好的。 某些档案格式有“磁号”,可查到:Here,用于更多这方面的信息。 我从未亲自尝试过,因此,我可以说,这种执行将多么坚实。 我认为最好的方法是用数据检索文档类型。
What is the use of default keyword in C#? Is it introduced in C# 3.0 ?
I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...
I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...
I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...
I have two EF entities. One has a property called HouseNumber. The other has two properties, one called StartHouseNumber and one called EndHouseNumber. I want to create a many to many association ...
How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...
Since I cannot order my dictionary, what is the best way of going about taking key value pairs and also maintaing an index?
Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...