Wednesday, February 3, 2016

YNAB or You Need A Budget

...is a moblie app for micromanaging your spending.

asp:Panel magic

Did you know that if you wrap things in an asp:Panel in a web form that you may then dictate which button click gets emulated when a user submits the form by way of pressing enter while in one of the fields within that panel? Nice. The "DefaultButton" inline setting in the markup gets the id of the button to click as its setting and that button doesn't even have to be inside of the panel itself!

Tuesday, February 2, 2016

Cron Maker

It's simple junk software for punching the clock.

How do I force a refresh of an iFrame in web forms?

Change instead a asp:HiddenField! You then need a jQuery middleman like so?

function listenForIFrameRefresh() {
   var listener = function() {
      var backingstorewrapper = $(".emailTrigger")[0];
      var backingstore = $(backingstorewrapper).children()[0];
      if ($(backingstore).val()) {
         document.getElementById("refreshme").src = "IFrameForLogo.aspx?" +
               $(backingstore).val() + "=" + (new Date());
         $(backingstore).val("");
      }
   }
   var interval = setInterval(listener, 100);
}

cpp in the preprocessor for C and it stands for "C preprocessor"

You can jam in header files and macros with it.

StyleCop

This allows for yet more ReSharper suggestions for C#. It's a plugin on top of ReSharper and the link I provide here suggests it is dated as it won't jive with Roslyn.

Monday, February 1, 2016

Set the html height to 100%; to accomodate old IE.

Have you ever tried to make something hang out midpage only to find it all smashed against the top in old versions of Internet Explorer? Me too. I had a table cell 100% tall and wide to cover the whole page and I was trying to put onto it styles like...

.whatever {
   vertical-align: middle;
   text-align: center;
}

 
 

...to kick into life this line effect which just wasn't working for some infuriating reason...

<td width="100%" height="100%" valign="middle" align="center">

 
 

...but of course the last place that is gonna work is in old IE. Something else was wrong. It turns out that the fix looks like this:

html {
   height: 100%;
}