The Eric Wroolie Blog

Overpass Experiences

  • Blog
  • Videos
  • Overpass Apps

Powered by Overpass Apps

Hanselman’s Ultimate Toolkit Post

August 27, 2007 by wroolie Leave a Comment

For the past few years, Scott Hanselman has been posting his list of Ultimate Developer tools on his blog. If you are into .Net development, it is definitely worth a look. Check out http://www.hanselman.com/tools.

Some of the tools he mentions are tools that I’ve started using over the past year. Others are tools I plan on using very soon. My favourite tools to date are Fiddler, Web Developer for Firefox, and WatIn Test Recorder. Most of the items on the list are freeware or open source and none are available as part of the standard Microsoft Suite of controls.

Filed Under: C# Coding, Software Dev & Productivity

Maintaining Treeview State in Asp.Net 2 with a Sitemap

June 29, 2007 by wroolie 2 Comments

For a couple of days, I was looking around for a way to expand a treeview menu to the node you are currently on. On a site with nodes that go several levels deep, it is a pain to have to open all the nodes every time a postback occurs.

I found code samples online and followed so many goosechases. Some people put a marker in the session to let them know where their node was. Others tried to do some clever javascript which didn’t seem to work for me. It seems to be some code that is heavily in demand.

Finally, I found a blog post by Walt Ritscher which helped me get what I wanted in a few lines of code. It doesn’t maintain the state of all open and closed nodes on the tree, but it does open the tree to the node with the URL of the page you are on. It took me so long to find his blog post from last year, that I thought I would add another link here:

http://waltritscher.com/blog/ramblings/archive/2006/05/18/843.aspx

His examples are in VB.Net, but a conversion to c# is not difficult. Here are my code examples:

In the .aspx page:

<asp:TreeView ID=”TreeView1″ ExpandDepth=”0″ OnTreeNodeDataBound=”treeMainMenu_TreeNodeDataBound” PopulateNodesFromClient=”false” NodeWrap=”false” HoverNodeStyle-ForeColor=”green” HoverNodeStyle-Font-Underline=”true” NodeIndent=”10″ Height=”100%” runat=”server” DataSourceID=”SiteMapDataSource1″>

</asp:TreeView>

Notice the “OnTreeNodeDataBound” and “PopulateNodesFromClient” attributes.

In the code behind:

protected void treeMainMenu_TreeNodeDataBound (

Object sender,

System.Web.UI.WebControls.TreeNodeEventArgs e )

{

if (Request.Url.PathAndQuery == e.Node.NavigateUrl) {

e.Node.ExpandAll();

}

if (e.Node.NavigateUrl == “”) {

e.Node.SelectAction = TreeNodeSelectAction.Expand;

}

}

Anyway, thanks to Walt for his blog post. I looked over some other posts in his blog and found it very interested. You might want to have a look too.

Filed Under: C# Coding, Software Dev & Productivity

I’m a Firefox Convert — finally

June 23, 2007 by wroolie Leave a Comment

I finally switched to Firefox as my default browser this week. Despite the hype in the past, with Firefox 1.x I found too many sites which just didn’t render properly (due to web developers who didn’t code to standards). I also always work in corporate IE-only environments, so I always code and run with IE and do last-minute Firefox checks only if the project warrants it. The only reason I could see to use Firefox in the past was that it didn’t support Microsoft, but I found the quality of the browser lacking.

But this week I was building an ASP.net 2 app for a client and started to check things out in Firefox. I found everything rendered nearly identically. This way, I already had peace of mind about the code I was producing as I was building it (if it looked good in Mozilla, it will look in IE).

Firefox 2 seems to be a huge improvement over 1.x. I was really impressed.

I really started to appreciate Firefox when I started looking at the add-ons. There are hundreds of add-ons and themes written by the community that allow you to customise your browser exactly how you like it. A lot of the functionality is only coming into Windows with Vista and the sidebar, but it is still clunky. I like the add-ons best.

Here are some of the add-ons I’ve installed:

  • ForecastFox Enhanced — a weather update add-on which gives me up-to-date weather forecasts in the corner of the status bar (great for knowing what to wear on the motorcycle). Unlike the new weather gadgets in Vista, it allows you to set up separate profiles. When I’m at my client’s site, I choose their location and when I’m at home, I choose my own.
  • Del.ico.us Bookmarks ? I frequently bookmark something on my desktop but want to read the article on the laptop when I’m sitting on the couch later in the evening. I have to maintain two sets of bookmarks and it never works. With this add-on, it’s easier to use an online service like del.ico.us for all of my bookmarks (and I can have thousands).
  • FoxyTunes — I have a music add-on which interfaces with WMP so I don’t need to Alt-Tab each time I want to pause the music I’m listening to or skip to the next track.
  • Web Developer — superior to the developer Toolbar in IE.
  • Wizz RSS News Reader ? much better than the Feeds in IE7 and Outlook 2007 (which never stay in sync with each other on the same machine)

Anyway, I haven’t given up on Microsoft in any way. I still prefer Windows Media Player to iTunes (except where I need my iPod or for lookup up podcasts). But in browser terms, I’m going to give Firefox a go for a while.

<

Filed Under: Software Dev & Productivity

  • « Previous Page
  • 1
  • …
  • 26
  • 27
  • 28
  • 29
  • 30
  • …
  • 37
  • Next Page »

Recent Posts

  • My Gig and the Imposter Syndrome
  • Getting Picked Last for Teams in PE
  • One Little Growth Opportunity at a Time
  • I’m sorry if I look like I know what I’m doing
  • New Years Reclamations