Archive

Posts Tagged ‘ASP.NET’

Internet Explorer limits CSS and Script Resources to 30

March 5th, 2010 No comments

I ran into a weird bug recently that I hope no one else ever experiences.  I use Telerik’s Rad Controls for ASP.NET AJAX because they’re powerful, pretty and developer friendly.  I recommend them to ALL .NET developers.  I had just put together a server control that used several of Telerik’s controls and my own Rounded DIV Container control as well.  It looked great in all browsers.  I was happy.   I added another Rounded DIV to the page.  When I refreshed the page, all of my styles were gone.  I know the CSS is good, because I was using the control elsewhere.  Was it possible I had an unclosed tag somewhere?  I tried the page in Firefox…perfect, then Safari…perfect, then Google Chrome…perfect.

Scratching head…

At this point, I know it’s a browser issue, but I’m still not sure what’s causing it.  After digging around and playing with the Internet Explorer Developer Toolbar, I noticed that the page seemed to lose it’s style whenever there were more than 30 registers resources on a page (i.e. CSS & JavaScript file references).  I probably had too many CSS files as it was.  On top of that, I was dynamically referencing js files.  Telerik also register javascript and css files via the WebResource.axd (embedded .NET resources).

Here’s how you can check how many resources are registered for a given page:

  1. Check your markup
    1. Look for all instances of registered resources (CSS, JS, etc)
      <link id=”cssStyleSheet” rel=”stylesheet” type=”text/css” runat=”server” /> — each one of these counts as 1
    2. If you’ve got a lot of these, consider consolidating into fewer resources
  2. Use the IE Developer Toolbar, ChromeBug (Google Chrome) or FireBug (the best) to check for registered resources in WebResource.axd
    1. Firebug (ChromeBug is similar)
      1. Once the page is loaded, highlight the CSS tab and click the resource drop down list just below it
      2. Do the same thing on the “Script” tab (ASP.NET is close to 30! Watch out! :-) )
    2. IE Developer Toolbar
      1. In IE, press F12 to bring up the Developer Tools
      2. Click on CSS and count the items in the drop down list
      3. Do the same for Script

I hope you don’t have this many registered resources. :-)   But if you do, and things look weird in IE 7 and IE 8, now you know why.  Time to consolidate!

Listing checked-out files in Team Foundation Server 2008 (TFS)

September 18th, 2009 No comments

I needed a list of all checked-out files in TFS today.  This page came in handy! Thanks Clay!  Here’s what he had to say (slightly modified for VS 2008)

You can get a complete list of checked out files by using the tf.exe command line tool found in: C:\Program Files\Microsoft Visual Studio 9\Common7\IDE or C:\Program Files (x86)\Microsoft Visual Studio 9\Common7\IDE for you 64 bitters.

All checked out files in $/MyProject:

tf.exe status $/MyProject /user:* /s:http://MyTfs:8080 /recursive

All files checked out to Mark:

tf.exe status /user:mark /s:http://MyTfs:8080

You can write the output to a file:

tf.exe status /user:* /s:http://MyTfs:8080 > c:\tfsCheckedOut.txt

I also created this little batch file that will automatically output results to your desktop. It’s very simplistic, but saves time having to mess with the command prompt. Edit with your favorite text editor, save, and away you go.

Free .NET Weather & Rounded Div Container Controls

August 20th, 2009 22 comments

I used to run very small business on the side called “MJ Consulting”. I provided basic IT services to mom & pop shop businesses in my area; making sure that it did not conflict with any interests at my real job with Wachter. It was so small that I barely made enough to pay for the business license, domain name and a couple trips through the Wendy’s drive-thru. :-)

Well I haven’t done anything in that name for about a year, so I shut down the site. However, I had some .NET controls there. One was a Weather Channel control and another was a rounded corner “div” container. Typical “drag n drop” server controls. If you came here looking for those, you can find them using the links below. Shoot me an email if you have any questions or find a bug. Happy coding!

Download Rounded Div Control 3.2 Updated 02/27/2010
Download Weather Control 2.2 Updated 02/27/2010

Full source is now available on CodePlex.com for both controls.Visit http://WeatherForecast.Codeplex.com or http://RoundCorners.Codeplex.com for more details.


Like these free controls?  Please make a small donation.