Code Snippets

Drag and Drop Widgets with Bootstrap

Drag and Drop Widgets with Bootstrap

Just a little concept for the next BE release. Really want to get rid of editing on live site and move all under admin. Why put it here and not just stick in the Github repository or Plunker? Because blog supposed to be center of your digital Universe and if not then something is wrong with it and it needs to be fixed. Blog, not the Universe - that is out of scope. Maybe next year.

Read
Entity Framework 7 Getting Started

Entity Framework 7 Getting Started

If you are new to Entity Framework, especially to all new EF7, best way to start is to look at this code from sample application. It shows all you need to know to get rolling: connecting to database, creating a table, inserting and selecting data all in one simple console app.

Read
Bootstrap List Pager

Bootstrap List Pager

Bootstrap provides nice lists to display all kind of items your website might need. It is very useful, and because it meant to show just few items it is not paged. Problem is, sometimes I do need it paged. For most cases, it can be just a few rows, but for some it can grow in few dozens.

Read
Dynamic compilation in ASP.NET

Dynamic compilation in ASP.NET

We all know about magic App_Code folder. Just drop class file in there and it will become a part of the web application. This is fine for scripts like PHP or "classic" ASP (VB script), but C# is strongly typed compiled language. How App_Code works?

Read
Serializing XMLDocument to binary format

Serializing XMLDocument to binary format

Why in the world would you want to do that? Well, for one, you might want to use it in Remoting. Second possibility is when you have different objects that you want to treat the same way, and XML Document is one of them.

Read
Sorted GridView

Sorted GridView

Did it ever happened to you? You have a problem and, after research and brainstorming, finally come up with this nice elegant solution. Two month (and hundred problems) later, you are staring at the screen with basically the same task in front of you.

Read