
Image from Pexels
Tagged articles - ASP.NET
Found 89 articles tagged with ASP.NET
13
Sep
2014
Bypass SSL certificate validation
.NET229 titlesA workaround quick solution when your SSL certificate expires
0
It is a common thing that some of your application functionalities depend on an external HTTPS endpoint. However, renewal of SSL certificate for the external party is out of your control and you have to rely on the third party that certificate will be renewed on time...read more
09
Sep
2014
Filesize to proper display string
.NET229 titlesDisplay size of file in the proper maner
0
How many times you had to display file size on your web page? Pretty much every time you might have the same issue with recalculating size to KB or MB.
I caught myself doing this for so many times over and over, so finally I decided to write a piece of code for that.
...read more
08
Sep
2014
The fastest way to export data to Excel
.NET229 titlesExport data to Excel in ASP.NET C#
0
It is not so rare that you have to provide some sort of export of your data stored in database. I have a feeling that clients really like to have that functionality, probably because they are more comfortable with Excel than with any other tool.
First thing that might pop to your mind is to add a reference to Office library, but that would require that you have Office on the hosting machine which might not be the case as most of hosts do not have it.
...read more
06
Sep
2014
Simple object mapper using reflection
.NET229 titlesCopy property values from one object to another using reflection
0
Dealing with models and POCO classes in MVC sometimes require to map properties from one object to another because they have some properties of the same name and type.
This also can be a case when you are loading a model class from some other source and you need to transform it to your type with some additional properties, but also a bunch of properties with values from the source object instance.
...read more
04
Sep
2014
Getting cropped image the smart way
Umbraco CMS25 titlesThe way to get cropped image URL with option to load original image too
0
I noticed that some of the content managers keep complaining about the quality and size of cropped images. If you lower down quality, file is smaller but in some cases it gets blurry with quirks which comes from compression applied to a file.
Let's face it, image cropper is not Photoshop with all options for image optimization...read more
03
Sep
2014
Check whether you are getting cached content in MVC website
.NET229 titlesThe ways to check whether you are viewing cached or most recent content
0
It happens from time to time that you publish some content from back-end, but on the website you still see the old content.
Reasons for this may be different:
...read more
03
Sep
2014
Single file deployment concept in ASP.NET with WebAPI
.NET229 titlesDeployment contained in single file using WebAPI
0
As much as this sound new to you, it actually isn't.
If you worked on any Windows From application in .NET you had an option to embedded files in your form like images, icons and even sounds and videos. This made deployment a lot easier because you only have to deploy one .exe file.
...read more
27
Aug
2014
Fastest way to return JSON result from a controller
Umbraco CMS25 titlesResturn JSON in MVC controller action
0
Recently I had to develop a form on a page which loads secondary dropdown list items based on selection in a primary dropdown list.
Because secondary list items are basically children elements of the one selected in primary I just had to run through all children and just return text-value pair object to JavaScript to populate secondary dropdown list.
...read more
25
Aug
2014
Nesting Dictionary items to create lists
Umbraco CMS25 titlesStoring and reading nested Dictionary items as lists in Umbraco using API
0
Recently I wrote an article about workaround for storing lists in Umbraco. I did some googling and Umbraco API exploring since then I found another solution for lists in Umbraco.
This solution is relying to Umbraco Dictionary...read more
16
Aug
2014
Dictionary lists in Umbraco
Umbraco CMS25 titlesOut of the box solution for Dictionary lists in Umbraco
0
Umbraco implementation of localized values is based on Dictionary which is in settings section of Umbraco back-end. This works pretty fine in case you need to display only string values but does not work localized lists.
For example you might want to have country list for your contact form on your website...read more
14
Aug
2014
Using GoogleMaps Directions API to get accurate distance
.NET229 titlesExample of using GoogleMaps Directions API for calculating the distance
0
In situations where distance between two geo coordinates needs to be found most of the people are using mathematical function to do this. However there is a major disadvantage in using this method...read more
11
Aug
2014
Restrict Access to an MVC Action or Controller based on IP address
.NET229 titlesIP Address Filtering in MVC Controller
0
When you are developing a back-end web application, you might want to restrict access only to people who are working in the company which is maintaining the content or any other operations in the back-end and allowing public access only for the public, usually read-only content.
This means you still have to leave some parts of your application public and for some you need to restrict access for the people outside of a network (certain IP range).
...read more
03
Jul
2014
Synchronous vs asynchronous MVC controllers
.NET229 titlesAdvantage of using asynchronous over synchronous controller in MVC
0
Maybe you did not know but asp.net applications have limited number of threads available to process requests.
This value is set in your machine.config in configuration/system.web/processModel node. This file is located at
...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
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
.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