Archived articles
Archive for February 2018
28
Feb
2018
Export DataSet and DataTable to Excel with C#
.NET
126 titles
Saving DataSet or DataTable instace to an Excel spreadsheet with C#
0
Some time ago I wrote an article on how to export data to Excel from C# code. Essentially it exports data to file which can be opened in Excel but it does not produce the actual Microsoft Office Excel document.
I recently wrote an article on Working with Excel files in .NET without using COM in C#, so I decided to use this approach to create extension methods for DataTable and DataSet classes...
read more
28
Feb
2018
Export DataTable to HTML in C#
.NET
126 titles
Generate HTML table from DataTable instance in C#
0
When I searched for exporting s to HTML table in C# I found a lot of articles and code snippets which are basically doing string concatenation or String.Format on the hard-coded HTML String to generate HTML string of the table.
To me this approach is a bit like a workaround and I was never a fan of hard-coding values. In addition, code with a lot of hard-coded value end up as hardly maintainable code...
read more
27
Feb
2018
Working with Excel files in .NET without using COM
.NET
126 titles
Read and write Excel files with C# using OLEDB on x86 and x64 platforms
0
Excel is a common format for storing tabular data. It is a powerful tool from Microsoft Office package.
Since it is often format for string data, it is often required to work with this data from the third party applications...
read more
25
Feb
2018
Simplest way to store lists and dictionaries in config files
.NET
126 titles
Fast and simple way of storing and using lists and dictionaries in config files
0
Configuration files are a useful place too keep any related configuration settings. It provides easy to use configuration fetching which you can invoke from any part of the application.
However it does not support many stuff out of the box, but on the other hand it is pretty flexible and expendable. One of the things that are not there built in is support for lists.
...
read more
25
Feb
2018
Send data to Azure Log Analytics from C# code
.NET
126 titles
Sending data to Azure Log Analytics from your C# code
0
Azure as a part of Microsoft Operations Management Suite provides data collection and insight services inside Azure cloud platform.
It allows you to:
...
read more
24
Feb
2018
Multiple file upload with ASP.NET WebApi
.NET
126 titles
Upload multiple files using WebApi REST service
0
Taking out business logic from the application allows different clients running on a different platform to use same logic. REST API is a great way to decuple business logic and make it available to different clients on a different platforms. To upload files using WebApi we first need to define an action in a WebApi controller to handle files posted to the endpoint.
...
read more
22
Feb
2018
Merge folders with Windows PowerShell script
PowerShell
16 titles
Detect changes and merge folders and files with PowerShell script
0
When deploying application to specific location it is often required to deploy only few files and not the whole deployment package.
For example, if you changed only single static image file in your ASP.NET WebApplication, there is no reason to overwrite bin folder content and cause WebApplication on IIS to restart.
...
read more
18
Feb
2018
Installing same Windows service under a different name
.NET
126 titles
How to install same Windows service with different name on the same host
0
Microsoft .NET framework comes with a really good support for Windows services. Regarding the project itself, Visual Studio IDE comes with build in project template for Windows service.
.NET framework itself comes with a built in tool installutil for deploying the Windows Service project...
read more
18
Feb
2018
Sending email with Gmail account using PowerShell script
PowerShell
16 titles
Send email with your Gmail account login with PowerShell script
0
Sending email after and even before a long running PowerShell script is a logical thing to do to notify users which are responsible for taking actions for the specific operation. PowerShell starting from version 3.0 has build in cmdlet Send-MailMessage for sending emails.
...
read more
15
Feb
2018
Use PowerShell to install SSL certificate on IIS
PowerShell
16 titles
Importing PFX SSL certificate to IIS with PowerShell script
0
Since Google announced HTTPS as ranking signal most of the websites now days are switching to secured communication via SSL certificates. Even I switched my website to HTTPS secured connection to follow up with this new trend.
Using certificate on the website is related to domain binding, but even before we setup the domain binding for the website, we need to import the certificate to IIS...
read more
.NET
7
Apr
2018
Simple implementation of ASP.NET Web API Basic authentication security
Securing Web API with simple basic authentication and consuming it from the client code
28
Mar
2018
Getting GIF image information using C#
Extracting GIF image data in .NET using C#
25
Mar
2018
How to avoid Thread.Sleep in your production code in .NET
Avoiding Thread.Sleep in production code in .NET using C#
23
Mar
2018
Reduce traffic by serializing JSON with different alias with Json.NET and C#
Reducing speed and increasing performance by reducing traffic with JSON size
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
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
13
Apr
2015
Dealing with duplicate rows in SQL Server
Finding and cleaning up duplicate rows in SQL Server tables
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