Friday, March 27, 2009

pageLoad() – check if partial refresh

 

function pageLoad(sender, args) 
{
    if (args.get_isPartialLoad()) 
    {
        alert(”Ajax call”);
    } 
    else 
    {
        alert(”PostBack or initial load”);
    }
}

Friday, March 20, 2009

Code Formatting plug-in for Live Writer

This plug-in formats and highlights code and also does the following:

  • The ability to format the code 'live'
  • The ability to wrap lines
  • The ability to change the background color
  • The ability to just quickly paste what's in the clipboard as code
  • The ability to change the font, including the font name, size, weight, and style.
  • Dozens of languages, including PowerShell, MSIL, Pascal and XAML
  • NEW: The ability to use different formatting engines - in this release, ActiPro (Insert formatted code), and SyntaxHighlighter (Insert highlighted code)
  • NEW: The ability to output either formatted text (html) or images
  • NEW: Now works with the latest version of Windows Live Writer
  • NEW: The code editor now uses the superb ActiPro code editor.  ActiPro very kindly donated the license.

 

 

 

more info here

Monday, March 16, 2009

C#: Control over date formatting, replace ToShortDateString

 

I found that it is more flexible and readable for me to use the ToString formatting for dates

objDate.ToString("MM/dd/yyyy");

than to use this:

objDate.ToShortDateString()