- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 4
- Posts with Downvotes
- 3
- Downvoting Members
- 3
4 Posted Topics
Try this example: public void TheDownload(string path) { System.IO.FileInfo toDownload = new System.IO.FileInfo(HttpContext.Current.Server.MapPath(path)); HttpContext.Current.Response.Clear(); HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment; filename=" + toDownload.Name); HttpContext.Current.Response.AddHeader("Content-Length", toDownload.Length.ToString()); HttpContext.Current.Response.ContentType = "application/octet-stream"; HttpContext.Current.Response.WriteFile(patch); HttpContext.Current.Response.End(); } The implementation is done in the follows: TheDownload("@"c:\Temporal\Test.txt"");
Hi, look at this link, there is a clear example of how to do it, I served me a lot and it works. http://www.systemdeveloper.info/2014/01/change-header-text-of-columns-in.html You must use the ItemDataBound event protected void theDataGrid_ItemDataBound(object sender, DataGridItemEventArgs e) { if (e.Item.ItemType == ListItemType.Header) { try { //doing something with the header text …
Try this, I did it this way and it worked wonders, in this link you will find more details. http://www.systemdeveloper.info/2013/11/decrypt-files-encrypted-with-gnupg-from.html public static string DecryptFile(string encryptedFilePath) { FileInfo info = new FileInfo(encryptedFilePath); string decryptedFileName = info.FullName.Substring(0, info.FullName.LastIndexOf('.')) + "Dec.TXT"; string encryptedFileName = info.FullName; string password = System.Configuration.ConfigurationManager.AppSettings["passphrase"].ToString(); System.Diagnostics.ProcessStartInfo psi = new …
Look at this link, here you will find an example where they explain how to proceed http://www.systemdeveloper.info/2013/11/trace-soap-requestresponse-xml-with.html I hope to be useful
The End.
Angel Armando