Legal Notice
The opinions expressed herein are my own personal opinions and do not represent my employer’s view in anyway.Top Posts
- C# HttpClient POST or PUT Json with content type application/json
- Using C# HttpClient from Sync and Async code
- Read blob file from Microsoft Azure Storage with .NET Core
- C# Get expiry timestamp from JWT token
- ASP.Net Core API - "'s' is an invalid start of a value. Path: $ | LineNumber: 0 | BytePositionInLine: 0."
- C# Using Newtonsoft and dynamic ExpandoObject to convert one Json to another
- Creating dynamic arrays and lists using Dynamic and ExpandoObject in C#
Archive
Meta
Tag Archives: .NET
Write to file from multiple threads async with C# and .NET Core
There are several patterns on how to allow multiple threads to write to the same file. the ReaderWriterLock class is invented for this purpose. Another classic is using semaphors and the lock statement to lock a shared resource. This article … Continue reading
Posted in .net, .NET Core, c#, General .NET
Tagged .NET, .NET Core, Asynchronous, ConcurrentQueue, Multithreading
Leave a comment
Change date format using .NET Regular Expressions
You can use Regex.Replace to change the format of a date string. For example if your input string is YYYY/MM/DD but you need to change it to YYYY-MM-DD, you can use this small method: Regular expressions are unreadable as usual, … Continue reading
Your session ID is being reused and there is nothing you can do about it
In many years we have been used to the fact that the ASP.Net session ID uniquely identifies one session, and one session only. Back in 2006, Margaret Rouse from TechTarget even wrote in the definition of a session ID that: … Continue reading
Validate CheckBoxList using a CustomValidator
In this article I explain how you can validate that at least one checkbox is checked in an asp:CheckBoxList using an asp:CustomValidator, and how to make it work server side and client side. None of the built in .net validators … Continue reading
Posted in .net, c#, General .NET
Tagged .NET, CheckBoxList, ClientValidationFunction, ControlToValidate, CustomValidator, isvalid, Javascript, server side validation, validation
6 Comments