So you generate a PDF in the C# code or any back end code, but need to send it back to the JavaScript doing the AJAX request. The trouble is how you return a file back to the client side and is the same problem I faced. There are loads of methods of how to do this that I have seen on the line, but these are the ways I found worked with C#.NET and JavaScript.
Category Archives: Software Engineering
Resharper DotCover Analyse for Visual Studio Team Services
Do you use Visual Studio Team Services (VSTS) for Builds and/or Releases? Do you use Resharper DotCover? Do you want to use them together? Then boy do I have an extension for you!
That might be a corny introduction, but it is exactly what I have here.
Keeping an images ratio on resize in JavaScript
A little tricky task was given to the team I am working in, to keep an image at its aspect ratio. However the catch is that it needs to be able to go as large as it can to fill the screen at all times, while the user can resize the screen and keeping theContinueContinue reading “Keeping an images ratio on resize in JavaScript”
How to merge multiple images into one with C#
Due to a requirement we needed to layer multiple images into one image. This needed to be faster and efficient plus we didn’t want to use any third party software as that would increase maintenance. Through some fun research and testing I found a neat and effective method to get the outcome required by only using C#.NET 4.6.
How to Iterate multiple folders/files in Gulp
When searching for a method to loop not just the first level of files and folders, but also all the levels below. Asking to much I wanted the files name, its folder location and also the files content. I found it… I found the Gulp plugin ‘src’ and ‘tap’… Gulp-tap > https://www.npmjs.com/package/gulp-tap Gulp-src > https://www.npmjs.com/package/gulp-srcContinueContinue reading “How to Iterate multiple folders/files in Gulp”
Returning an image from a General Handler in .NET
You know how to return a string, you know how to return an integer and you know how to return JSON, but do you know how to return an image from a General Handler file (ashx) in .NET 4.6? Well if not then fear not as I have the answer. Simply put you make sureContinueContinue reading “Returning an image from a General Handler in .NET”
Password Regex with optional Special Characters Symbols
After number of failed attempts I have gotten to the Regex that validates your password with optional symbols. This example will validate it has 1 lowercase letter, 1 uppercase letter, 1 number and then the symbols are optional, but it also validates the symbols added in are acceptable.
Visual Studio Team Services Gulp Task Setup
The Visual Studio Team Services Gulp task is a free pre-built module in the VSTS build and release section that runs, yes you guessed it, gulp tasks. As much as it is very good and the directions on use are good, but one part I found hard was how to pass the arguments into the task. Therefore instead of just showing how to do this, I will also give some general information on the use as well.