Tagged articles - C#

Found 175 articles tagged with C#

Database Change Notifications in ASP.NET using WebSocket
Display 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
Using WebSocket in MVC4
Real 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
Returning an image in Web API method with fallback result image
How 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
Getting System.Drawing.Imaging.ImageFormat from a string
Get 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
Different data type in Web API response of the same method
Both 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. More on how to force return type on API method side itself you can find in this article...read more
Aggregating RSS feeds from Umbraco content
Serving 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
Generating HTML string in C#
The 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
Serving embedded resources through WebAPI in Umbraco
Make 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
Fetching image cropper cropped file path
IPublished content extension for getting crop image file easily
0
ImageCropper datatype was once part of uComponents, but because it is so usefull, it is now included into standard Umbraco instalation. However as much it is useful, I could not find the way to get cropped image file properly with anything that was shipped with Umbraco installation. Therefore I decided to write my own extension and to make life easier while working with ImageCropper in Umbraco. ...read more
Enumerable Tips & Tricks with String and Int
Useful things to do with Enumerable in a single line
0
System.Linq.Enumerable is a core of LINQ magic. Most of the functions we use in a daily basis for anything we write with sequence, but what is really interesting is that methods from this class can be used for some tricky operations on strings and numbers and make them one line instead of loops. ...read more
Forcing accept type for WebApi call
Setting accept type on the server side for the WebApi request
0
One of the coolest things of WebApi is that adapts to accept type sent in request header. This header value depends on a client. Based on this WebApi will serve different formats of data (XML/JSON). ...read more
Extending WebForms Page class for registering stylesheet include
Extension method which enables registering stylesheet file reference
0
I recently started working on an Umbraco package for GoogleMap manipulation. Since initial version of package is planned only for Umbraco 6 I decided to use WebuserControl for creating a package custom datatype. It means that for one document type I might have multiple control instances on the page. ...read more
Exposing richtext property from content in Umbraco Web Api
Problem when exposing richtext property from Umbraco through Web Api
0
Almost every content page in your website will have one richtext property for adding rich content for the page. This allows you to add Macros so you can render dynamic content inside page content at custom places in the page itself. ...read more
Hide property in Umbraco
How to hide property in Umbraco backend
0
There is no option for hiding a property in Umbraco. Simply, when you define a property for document type, it is assumed that you are going to use it. However, sometime you need to hide it for some specific condition, like level of document in a tree, or document type which might inherits some property which you do not want to use in inherited document type...read more
Optimized media serving in Umbraco by creating media CDN
Reduce bandwidth with serving from one domain
0
Let's say you have multiple websites with different domains in one Umbraco instance. All websites will use the same media, but the catch is how will it serve them. For example the same image will be served to a browser with two different paths like the following: ...read more

.NET

read more

JavaScript

read more

SQL/T-SQL

read more

Umbraco CMS

read more