Adding attributes to HTML.EditorFor in MVC 5.1

I’ve been adding WAI-ARIA attributes to an ASP .NET MVC site lately (to enhance accessibility of the site) and it lead to some interesting research on how best to accomplish this.

One of the most prominent discussions is an MSDN blog entry from 2012 entitled “ASP.NET MVC: Adding aria-required attribute for required fields” by Stuart Leeks.

Stuart went into moredetail on supplying HTML attributes with EditorFor, and teamed up with his colleague Simon Ince to explain how to add HTML attributes in Templated Helpers such as EditorFor.

Fortunately, I found a better way thanks to a post on how to specify HTML Attributes in an EditorFor by AntonK on this December.  He also referenced the portion of the MVC 5.1 release notes where they explain that MVC now allows passing in HTML attributes in EditorFor as an anonymous object.

Here’s an example of how I used it to add an ARIA “aria=required” attribute:

@Html.EditorFor(model => model.City, new { htmlAttributes = new { @aria_required=”true” } })

@Html.ValidationMessageFor(model => model.City, “*”)

Note that the attribute is listed with an underscore, which MVC replaces with a hyphen.

I hope this helps!

Join me in celebrating “Lysander Spooner Day” on May 14th!

I propose that Americans observe Lysander Spooner Day on May 14th (a Thursday this year).


By refusing any and all un-wanted mail!

I’ll get to the how in a moment, but I think it’d be a fitting tribute because Mr. Spooner thought that the US Postal Service was an unconstitutional monopoly – so he did what any good person would and responded by starting a competing company, the American Letter Mail Company.

The US Government responded to this competition by tying him up in court until he ran out of money and shuttered the company.

Fast forward about 170 years…

I just got done sorting through a pile of unread mail in my home.

It weighed 8.5 lbs (4kg)!

After sorting it into two piles, I found that 86% of the mail was unsolicited junk!

So here’s how to stop it.

The USPS Domestic Mail Manual section 508 part 1.1.3 “Refusal After Delivery” explains that Addressees may control delivery of their mail.

One way to do this is to write Refused near the postage (I’ve used a fat tipped fluorescent pink marker to great effect), then returning it to my mailbox with an indication that there is mail to be picked up.

When the letter carrier arrives, they see the mail piece, read the Refused note, and process it accordingly.

That’s all there is to it – and it takes a lot less of your valuable time and effort to write Refused on a letter (or you can use a Refused stamp) than it does to recycle the mail or throw it away.

Don’t you think that’d be a fitting remembrance for a guy who was bullied by the US Government?  If so, simply share this post with your friends, family, and most importantly – your neighbors!  This protest against Government bullying and junk mail will work best if people participate together.

I propose the hashtag #LysanderSpoonerDay in social media.  Please join me in spreading the word so that Lysander Spooner and the ideas he stood for are remembered across the nation.

All I ask is that you share a link to this page with your friends, and by all means, let me know if you’ll be participating!

Some of you might be wondering, “What happens if I do this for a while – will I get in trouble? Will my letter carrier get mad at me?” For the answer to those questions, I’ve detailed my experience with refusing United States Postal Service junk mail.

My experience with refusing United States Postal Service junk mail

Earlier today I discovered that I had 8.5 lbs. of mail in my house – none of it really important as evidenced by the fact that I ignore it to no ill effect for long stretches at a time – in this case, several months.

I had been refusing my mail using the process described in the USPS Domestic Mail Manual section 508 part 1.1.3 “Refusal After Delivery”.

But how did I get that much junk if I’m refusing it?  Well, I took a break because we added a new member to our family and I honestly didn’t have time to interact with mail at all – not even enough to refuse it.

But I did use this approach before for several months and here’s what happened.

At first, the mail simply disappeared.  This happened for a few weeks.  Then, one day when I wasn’t home, the letter carrier asked my wife a strange question.

Does your husband live here anymore?

My wife suspected something fishy and said that yes, of course I still lived here, and asked him what led to his question.

He said:

Oh, well, we’ve been getting a lot of mail addressed to him that is refused… so we’re going to assume that he doesn’t live here anymore and hold all of his mail.

Seriously? Threats?!? They didn’t like what I was doing so they were going to hold my mail hostage and make me go to their post office to beg for it – no doubt with a complimentary tongue lashing?

My wife responded that the mail man would need to discuss that with me first.

It took me a few days to catch my letter carrier to discuss it with him.

I asked him what the issue was and he explained that my refusal was causing a lot of confusion and frustration at the local post office.

Specifically, he was concerned that it was his sworn duty to deliver every piece of mail with proper postage to my house.

I explained that I did not in any way wish to interfere with anyone’s attempts to do so – only that, as documented in the Domestic Mail Manual, I would be exercising my authority to refuse any mail allowed by the policy.

He said that this left them in a bit of a pickle.

According to him, anything mailed first class would be sent back to the sender – at the sender’s expense (which is an easy way to use market forces to encourage organizations to stop sending junk mail – who wants to pay for useless junk mail?).

That was a hassle for them – but at least they knew what to do with it.

The problem was “bulk mail” that is delivered to everyone in an area as a service of the Postal Service.  Apparently they don’t have a process for returning it – and my junk mail was piling up in the post office.  Worse yet, they have strict policies against destroying or disposing of mail.

His proposal was that I continue to accept delivery of mail as before – and continue expending time and energy processing it as garbage or recycling.

I expressed that I was simply trying to simplify my life, and that while I planned to deal with any requested mail, the junk mail was tantamount to someone stopping by each day and littering in my living room.

I explained that I was unsympathetic to the concern that the perpetrators of this littering would now have to shoulder 100% of the burden for the trouble they’ve caused me and countless other Americans for years.

Since I have nothing against my letter carriers or US Postal Service employees personally, I notified him that I opted out of “bulk mail” and that as a result he would no longer have to shoulder my mail both to my home, and back to the post office after I had refused it.

Unfortunately, he was unwilling to accept my proposal, once again admonishing me that he was bound by sacred trust to deliver every fake foreign lottery winning notice some fraudster felt like sending.

I also explained that, perhaps he could obtain some relief by asking the USPS to amend the Domestic Mail Manual (DMM) or other policies to address his concerns.  It was a real shame that people reading and following the instructions in the DMM were causing so many internal issues – but those were issues between the USPS and it’s employees, and as a customer there was little I could do about them.

Disappointed, he smiled and said that his supervisor would be paying me a visit and I responded by sharing my schedule so she could catch me on a weekday when I was home.

Unfortunately, I have yet to discuss the matter with a supervisor as none have ever attempted to contact me.

So, there you have it… refusing mail in compliance with DMM guidelines may result in threats and attempts to coerce you to stop, but so far I have not explored the limits of adhering to this approach in the long run, so my apologies if it results in less favorable outcomes in your particular case.

How to Set Messenger to Auto Sign-In

  1. Press the Xbox button on your controller (the round silver button with the green “x” on it) to bring up the Xbox Guide.
  2. Navigate to the Settings tab on the far right.
  3. Select the Profile option at the top of the list.
  4. Select Sign-in Preferences near the middle of the list.
  5. In the Messenger Auto Sign-In section, select either On or Off, then press the Xbox button to return to the screen you started from.

Using this method you can set your Profile Auto Sign-In as well as your Messenger sign-in status. The benefit of auto sign-on with messenger is that any friends with Messenger on their phones or computers will see that you are playing Xbox and be more inclined to join you for a gaming session. Smile

Replacing Turn Signal Bulb in 2010 Ford Fusion

Replacing tail/brake/turn signal/backup lamp bulbs
The tail/brake/turn signal and backup lamp bulbs are located in the tail
lamp assembly. Follow the same steps to replace either bulb.

  1. Make sure the headlamp control is in the off position and open the
  2. Lift out trunk floor carpeting panel to access a luggage scuff plate
    (hard molding) and a trunk side panel (dark grey, soft wheelhouse side
    trim panel) at the lamp area.
  3. Carefully pull/push the trunk side panel (dark grey, soft wheelhouse
    side trim panel) outboard to expose the lamp assembly. The most
    effective point to grasp the trunk side panel when pulling it out from the
    luggage scuff plate is at it’s bottom edge where that edge meets the
    exposed sheet metal of the trunk floor.
    Note: Do not allow the trunk side panel to remain bent and untucked
    from the luggage scuff plate (hard molding) for a long period of time.
    Doing so may result in permanent deformation.
  4. Remove the bulb socket byimage
    turning it counterclockwise and
    pulling it straight out.
  5. Pull the bulb from the socket and
    push in the new bulb.
  6. Install the bulb socket into the
    lamp assembly by rotating it
  7. Carefully push the trunk side
    panel (dark grey, soft wheelhouse
    side trim panel) back in position to the luggage scuff plate (hard
  8. Install trunk floor carpeting panel.

SOURCE: 2010 Ford Fusion Owner Guide 4th Printing, Page 70

Windows Media Player Skins

People seemed to love using Weeplayer since the footprint is so small. It was originally designed for people running high resolutions, but for people on computers running at a very low resolutions I wanted to offer Microplayer; something smaller that would even keep out of the way, yet “always on top” at lower resolutions as well.

Windows Media Player Skin Downloads


Microplayer Thumbnail
Microplayer.wmz (8.24 KB)
Released 6/28/2002

Microplayer is the second skin I have made – based largely on feedback I recieved from users of the original Weeplayer. Microplayer is designed to reside in the title bar of a maximized window near the upper-right corner of your screen.


Weeplayer Thumbnail
Weeplayer.wmz (7.86 KB)
Released 11/10/2001

Weeplayer is the first WMP skin I made. I spent a few hours one weekend reading the WMP SDK and figuring out how things worked. The rest was suprisingly easy. Weeplayer is designed for users who have high-resolution video cards. It has a large “Play/Pause” button so that it’s easy to control music and audio streams even though the interface is so small.

Feel free to share your opinion of the skin via my feedback chat (no login or software download required).