Tag Archives: webdev

jQuery to Highlight the Current Menu Item

4 Sep

Here is a little bit of jQuery code to highlight the current menu item. This presumes you are using a UL > LI > A structure to build your menu.

<script type="text/javascript">
  $(document).ready(function() {
    var path = location.pathname;
  $("li:has(a[href$='" + path + "'])").addClass("selected");  });
</script>

Web.Config Transformation

5 Feb

At the the Visual Web Developer Team Blog Microsoft details a feature that is being added for deploying a Web Application Project that will allow developers to specify sections in the web.config that will be replaced depending on the build environment. 

The example they show is replacing the connectionStrings section of the web.config when building for Release.  This is an issue I bump into all the time.  This is a feature that really should have been address in the 2008 release of Visual Studio.  The fact that Microsoft is only adding it in the 2010 release and only for Web Application Projects is pretty annoying.  I want this feature for Web Site Projects.

Debugging a Local Site on IIS 6 with Visual Studio 2008

7 Jan

There seems to be an issue with the .Net Framework 3.5 SP1 and Windows XP.  I setup a web site locally on my machine and when I tried to do some debugging I kept receiving error 401.1 permissions error.  I finally tracked down the following Microsoft support article that details a registry fix for this issue.  Here is a link to article with the fix. http://support.microsoft.com/kb/896861