Archived articles - June 2014
Archive for June 2014 (12)
29
Jun
2014
Database Change Notifications in ASP.NET using WebSocket
.NET229 titlesDisplay database change on website in real-time
0
Database table changes are usually not displayed right away in an application, escecially if it is a web application. With HTML5 and Web API that is about to change...read more
28
Jun
2014
Async file upload with MVC4
.NET229 titlesUploading file asynchronously using JQuery and MVC4
0
Uploading files with form submit on web page, especially large file requires user to wait for browser until file is uploaded. This does not produce very nice user experience as user needs to wait without any notification for file to be uploaded...read more
25
Jun
2014
Using WebSocket in MVC4
.NET229 titlesReal time data update with MVC4 and HTML5 features
0
Ajax is really cool. You can pull your data without refreshing the whole page, but increasing user experience and downsizing bandwidth for website.
If you have some live data which is changing really often, the best way to display it on website is to use pulling mechanism...read more
17
Jun
2014
Goodbye JQuery color-picker plugins
JavaScript31 titlesColor picker input in HTML5
0
A lot of browser these days support HTML file but not all of them in the same percentage. There are really cool stuff in there which makes developers and designers life a lot easier...read more
16
Jun
2014
Returning an image in Web API method with fallback result image
.NET229 titlesHow to return an image in Web API method
0
Imagine the following scenario. You are building a social network like website and you need to create your own API to enable other developers to integrate with your web location really easy.
One of the things that most popular social networks now provide in the API is providing profile image...read more
15
Jun
2014
Getting System.Drawing.Imaging.ImageFormat from a string
.NET229 titlesGet ImageFormat based on file extension using Reflection
0
Images are part of pretty much any application especially web. Not so rarely they need to be protected or exposed from a different sources which cannot be accessed directly with just typing URL to it's actual location.
It all comes down to writing image bytes to an output stream...read more
13
Jun
2014
Request different data type from Web API with JQuery
JavaScript31 titlesXML/JSON in return result of Web API REST service method with JQuery
0
In my previous article Different data type in Web API response of the same method I described how to get different response with HttpWebRequest in C#. Here I will demonstrate how to achieve the same thing but in JQuery client side code...read more
12
Jun
2014
Different data type in Web API response of the same method
.NET229 titlesBoth XML and JSON in return result of Web API REST service method
0
Web API restful services are very flexible and they return different data format (JSON or XML) depending on accept type header value from your browser (or other client). However this is not always so precise so sometime you have to force return type...read more
11
Jun
2014
Optimized usage of GoogleMaps API
JavaScript31 titlesReferencing GoogleMap API safely on your page
0
GoogleMaps are very useful to show location on your page. It is not a big problem if you have only one map, but in some cases you might have to add few maps on the page.
As many maps you want to display you only need to reference API once...read more
10
Jun
2014
Aggregating RSS feeds from Umbraco content
Umbraco CMS25 titlesServing Umbraco website content in RSS format
0
RSS stands for Really Simple Syndication. It's an easy way for you to keep up with news and information that's important to you, and helps you avoid the conventional methods of browsing or searching for information on websites.
Umbraco stores it's published content in XML format, so exposing website data is really easy...read more
07
Jun
2014
Generating HTML string in C#
.NET229 titlesThe proper way to generate html string in C#
0
From time to time you get to the point where you have to generate some HTML in C# code.
Of course, the easier way is to concatenate string and return that as a result of a method. This is not the most elegant solution and it is only fine for some short string.
...read more
06
Jun
2014
Serving embedded resources through WebAPI in Umbraco
Umbraco CMS25 titlesMake package deployment easy with single file deployment
0
Recently I've deploying GoogleMap Editor package to Umbraco community.
During development I realized that package will have to include script, some html templates, images... I had no problem with that but when it came to actual package build I realized that I will have to deal with bunch of files and even during development, so se some changes which were not dll related I had to restart app by touching web.config.
...read more
.NET
5
Jun
2022
Using dotnet nuget package vulnerability scan in Azure DevOps build
Listing nuget vulnerabilities and controlling build in Azure DevOps
5
May
2022
Protecting static files in ASP.NET Core using custom middleware
Restricting access to specific static content with middleware in ASP.NET Core
20
Dec
2021
Supporting multiple authentication schemes in asp.net core webapi
Using more than one authentication schemes in webapi projects
12
Dec
2021
Controlling the flow of migrations in EF Core
Altering EF Core migrations execution order
28
Nov
2021
Unit of work pattern with Dapper
Implementing unit of work pattern with Dapper in .NET 5
21
Sep
2021
Adding display name to Enum values
Implementing additional values for Enum items in C#
JavaScript
28
Oct
2018
HTML5 localStorage with expiry with vanilla JavaScript
Using HTML5 localStorage with expiry
8
May
2018
Monitoring DOM changes with JavaScript
Handling DOM changes with plain JavaScript
9
May
2017
Non blocking CSS load on the page
Load external CSS files in an async manner
16
Mar
2017
Serialize html form to JSON without using JQuery
Transform user input from HTML form fields to JSON
17
Jan
2016
Copy text value to clipboard using jQuery
Simple sample of using jQuery to copy value to clipboard
11
Jan
2016
Resize image on the client side with JQuery
Reducing the upload sie by resizing image on the client side
SQL/T-SQL
22
Feb
2022
Select column names with values from SQL Server database
Fetching column names with its value in T-SQL using built in JSON methods
23
May
2020
Identifying opened connections for the specific application in SQL Server
Connection listing queries in SQL Server
3
May
2018
Reading JSON data in T-SQL on SQL Server
Extracting values from JSON string on SQL Server using T-SQL
28
Apr
2016
Create XML/HTML with T-SQL
Generating XML/HTML output in SQL Server
24
Nov
2015
IP address to octets split in TSQL
Split IP addresse into octets in SQL Server
20
Jul
2015
Getting first and last second of the current year, month and day
Using minimum and maximum date time in SQL query
Umbraco CMS
2
Mar
2018
Minify HTML output of your pages
Minification of HTML output using ASP.NET IHttpModule
18
Apr
2015
Generate sitemap.xml on the fly in Umbraco CMS
Simple sitemap.xml Umbraco handler
2
Mar
2015
Accessing UmbracoHelper in HttpHandler request
Working with UmbracoHelper and IPublishedContent in HttpHandler
14
Sep
2014
Same page language switching in Umbraco
Land on the same page in different language in Umbraco using Relations
4
Sep
2014
Getting cropped image the smart way
The way to get cropped image URL with option to load original image too
27
Aug
2014
Fastest way to return JSON result from a controller
Resturn JSON in MVC controller action