To be on the safe side and ensure consistent behavior in all browsers, it’s usually better to use both:
Content-Type: application/octet-stream
Content-Disposition: attachment;filename=\"My Text File.txt\"
More Related Contents:
- Deploying website: 500 – Internal server error
- Can some hacker steal a web browser cookie from a user and login with that name on a web site?
- Is trying to develop for Medium Trust a lost cause?
- Server.UrlEncode vs. HttpUtility.UrlEncode
- Fixing slow initial load for IIS
- Advantage of creating a generic repository vs. specific repository for each object?
- jqGrid: using multiple methods to filter data
- Why would one use a third-party DI Container over the built-in ASP.NET Core DI Container?
- Why does the CheckBoxFor render an additional input tag, and how can I get the value using the FormCollection?
- How to prevent an ASP.NET application restarting when the web.config is modified?
- Post-Redirect-Get with ASP.NET
- When should I use # and = in ASP.NET controls?
- bytearray to image asp.net
- ASP.NET page life cycle explanation
- How do I render a partial form element using AJAX
- How to include a partial view inside a webform
- Elmah not working with asp.net site
- How to use Dependency Injection with ASP.NET Web Forms
- How do I define custom web.config sections with potential child elements and attributes for the properties?
- How to get POST data in WebAPI?
- Paging & Sorting grids with ASP.Net MVC
- How to access your website through LAN in ASP.NET [closed]
- How to use HTTPS in an ASP.Net Application
- ASP.NET Image uploading with Resizing
- Access Web.config settings in Asp.Net Core App?
- Which control caused the postback?
- When should a web service not be used?
- Is there an #IF DEBUG for Asp.net markup?
- C# ASP.NET Send Email via TLS
- Could not load type ‘site._Default’ [closed]