INTRODUCING LOREM.NET

A .NET library for all things random!

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam id commodo ante. In sagittis massa metus, ac viverra enim rhoncus vitae. Nunc ac orci orci. Nam sit amet metus nunc. Donec bibendum arcu a volutpat malesuada. Phasellus dapibus sapien non nisl posuere, at molestie ante iaculis. Mauris ligula neque, volutpat quis auctor at, eleifend eget lorem. Interdum et malesuada fames ac ante ipsum primis in faucibus. In quis orci id est ullamcorper gravida et porttitor tellus. Proin libero lacus, rhoncus vel nulla at, dignissim pulvinar ante. In hac habitasse platea dictumst. Donec ultricies turpis vitae massa aliquet porttitor. Donec eleifend sagittis dui. Donec venenatis vel dolor id dapibus. Etiam id arcu nibh.

Whoops. Sorry about that...

[continue reading]

Introducing Lorem.NET
8.20.2014 ~ 03:53 AM
posted in professional
tagged in c# : asp-net
comments [1]

 

IMPROVED ASP.NET MVC SECTIONS

I'm taking a break from my umbrella series in an effort to contribute to society, instead of distracting it!

I really wanted to like ASP.NET MVC Sections... but I just couldn't. They just seem so rigid.

For instance, say I had a section right before the end of my body tag to stash all JavaScript files -- this is great, except I can only add code to this section one time, from one View. But what if my View renders other [partial] Views, all of which need to add JavaScript to the end of the body? Because of this drawback, sections became almost entirely useless to me.

Orchard [a popular CMS engine I've talked about before] has the Script.Head() and Script.Foot() methods, and these seemed like a big improvement. You could add code to these anywhere, and as many times as you liked. Unfortunately, while it is a step in the right direction, it still isn't quite dynamic enough. It only allows two sections: the head and the foot (and not to mention the application has to be built within Orchard). So yet again, even though these Orchard helpers are good, they aren't good enough.

[continue reading]

Improved ASP.NET MVC Sections
1.25.2014 ~ 01:50 PM
posted in professional
tagged in asp-net : mvc : orchard : orchard-cms : c#
comments [0]

 

A YUPPIES GUIDE TO WALKING IN THE RAIN LIKE A MAN [PART TWO]

If you haven’t already done so, go read part one! If you don’t, you’ll just be lost and left to wonder, "What is this dumb thing and why am I reading it?" I’m not saying that reading part one will answer those questions necessarily [50/50 I’d posit], but my site could really use the page hits.

Alas, if part one is "tl;dr", let me summarize it for you: get this umbrella!

Now, let’s get down to business.

[continue reading]

A Yuppies Guide to Walking in the Rain like a Man [Part Two]
1.16.2014 ~ 10:38 PM
posted in personal
tagged in men-stuff : brogramming
comments [2]

 

A YUPPIES GUIDE TO WALKING IN THE RAIN LIKE A MAN

Congratulations, you’re a yuppie! (sellout!)

Life is a breeze. Your days are filled with pointless meetings, cubicle gossip, and, if you play your cards right, very little actual work.

In fact you’re probably reading this right now at work... I rest my case.

But that doesn’t mean you don’t have your fair share of challenges, and it’s important you confront those challenges head-on in the most classy and manly way possible.

Being a yuppie, you almost definitely walk to lunch on a daily basis (packing a lunch is for 3rd graders… although between you and me, I miss the snack packs). Heck, if you’re doing it right, your home is within walking distance of all the coolest happy-hour haunts.

Again... life is good.

However, one must always account for those rainy days...

Walking in the rain is one of the most emasculating challenges an adult male must face. I don’t care who you are, or how tough you may be - it’s the anti-spinach. You are probably all too familiar with its effects: shrugged up shoulders, squinting, pained eyes, and a face that screams "oh crap, I’m going to have to spend the rest of the day in soiled trousers".

In movies, the only time a man is ever shown in the rain is in the dreaded chick flick. Even then, it’s either after he’s been kicked to the curb, or when he’s outside defiantly proclaiming his love come hell or high water (what a wimp!) ... or if he’s being portrayed by John Cusack.

Keep in mind, this is only done to subliminally give the impression that the man is crying, without having to make him physically do it. Proving that even though women may say that want a sensitive man, you better not be so sensitive that you cry like a blubbering idiot.

Therefore, when combating an enemy as ancient as the earth itself, it’s important to be prepared both mentally and physically.

So, what is a man supposed to do in these difficult and wet times?

[continue reading]

A Yuppies Guide to Walking in the Rain like a Man
1.10.2014 ~ 04:30 PM
posted in personal
tagged in men-stuff : brogramming
comments [4]

 

SIMULATE "APPLICATION_START" IN CLASS LIBRARY

In the past, if you needed to run startup code in a class library, you included a method call in the "Application_Start" of the Global.asax file. Thankfully, .NET 4.0 has made things easier with the PreApplicationStartMethodAttribute! This helpful attribute allows us to hand-pick code to execute when the application starts without ever modifying the Global.asax file, or messier yet, creating an HttpHandler.

Let's see it in action!

[continue reading]

Simulate "Application_Start" in Class Library
12.30.2013 ~ 12:37 AM
posted in professional
tagged in asp-net : c#
comments [2]