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.
Tag Archives: JavaScript
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 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”
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.
How to use Chutzpah with Visual Studio and Build?
If you want to do some JavaScript Unit testing your most probably going to use things like Jasmine, Qunit or Mocha, which are all great things, but how do you run them? This was a challenge I came upon with Visual Studio and how to get it running like a normal NUnit test.
Guide to the Style Guide
This is about Coding Style Guides, what they are, if you should have one and if so then what one. I will mainly be following it through with JavaScript, but the knowledge can be transferred to other languages as it is the principle that I am looking at.
Visual Studio Code Cookie Snippet
If you didn’t know, Microsoft release an editor called Visual Studio Code and if you didn’t know, Visual Studio Code can handle Snippets and extensions. These Snippets can be created by Visual Studio and by the coding community. These can be simple modules to help coding or full languages. I have found a use toContinueContinue reading “Visual Studio Code Cookie Snippet”
JQuery Validate for 3 field date
A difficult and challenging task I had been given is to use the JQuery validate.js to validate the date fields, but this was then split out into 3 fields. One for day, month and of course year, which sounds easy, but it was not. The issue comes that validate.js is built to validate one field on its own and we wanted to validate not just each field, but also as a whole date.