Skip navigation.

Making Pals With PayPalAll recent postsView State Slaughter

Weather Control ver 1.7

I have updated the Weather control to ver 1.7. If you've been using it, please pull down the latest code.

A few words about what's new. I'd like to thank Joe Rattz for pitching the idea to add a Location ID property to the container itself. This tweak allows you to build URLs back to weather.com on the fly. For example:

<a href ="http://www.weather.com/weather/local/
  <%# Container.LocationID %>">...</a>

Please also note that the new DLL is anrControls.Weather.dll. I sort of broke my own rule on the first pass, i.e. to stick to [namespace].[project].dll convention that I find reasonable. Also, I will be releasing other components—such as Markdown.NET—under the same namespace, so this will help avoid assembly name clashes.

All you need to do is update your control Register tag in ASPX pages. For example, what used to be

<%@ Register TagPrefix="anr" Namespace="anrControls" 
   Assembly="anrControls" %>

becomes

<%@ Register TagPrefix="anr" Namespace="anrControls" 
   Assembly="anrControls.Weather" %>

Joe has also converted original PNG images to GIFs—something I simply didn't dare to do. :) If you prefer to tweak source code and are uncomfortable with PNGs, feel free to grab converted weather icons (1Mb, zip).

There's an outstanding bug: Joe reports the VS.NET designer wipes out the entire WeatherTemplate. It's not critical if you don't switch to the damned designer view. I haven't quite figured this out yet, but if anyone has a clue, please let me know.

It's great to see the weather control has been downloaded so many times! I hope you like it. As always, feedback is welcome.

Comments

Comment permalink 1 Chris Hutchon |
Thanks
Comment permalink 2 Richard Wysocki |
Have you noticed anything with certain Zip codes now working propertly with your control. We've experienced Zip codes 57707 & 64468 as failing. I debugged our code a weeks ago and it said something like a String not parsing correctly coming from the anrcontrols we got from you. So far, its been working great. Just wanted to know. Not very familar with C and will need to start reviewing the source if you hadn't seen this before.

Thanks so much for this.
Comment permalink 3 Milan Negovan |
Richard, thank you for letting me know. I'll look into this issue.
Comment permalink 4 Milan Negovan |
My location ID resolver does not resolve '57707' to anything. The USPS site doesn't recognize it either. The '64468' zip resolves to Maryville, MO just fine.
Comment permalink 5 dave |
Very nice work. Just a note to other dev's, there is a spelling mistake in the source code.

In order to use the LocationID property above be sure to update the source code changing LocatioID to LocationID (line 105 WeatherData.cs)
Comment permalink 6 Milan Negovan |
Oddly enough, I corrected the spelling long ago, but never uploaded a fix. Thank you for pointing it out.

Emails and Notifications

Would you like to be notified when somebody responds to this post?  Would you like to have these comments emailed to you?

TrackBacks

Sorry, TrackBacks are not allowed.

Submit your comment

Please enter only text since all HTML tags except hyperlinks will be stripped. Hyperlinks will become live links. Any comments with flaming or offensive language will be deleted. Be courteous to other posters. Thank you.

Your name (required):
Your email (optional):
Your site's URL (optional):
Enter this number
Type in the number above:
Comment (required):