June 2006 Entries
This flash animation is both clever and funny. [via bbspot
]
I've just discovered a bug/issue when using redirected pages. Let's assume I have the following in a page (Animal.aspx)
<asp:Image id="i1" runat="server" ImageUrl="~/Images/foo.jpg" />
In web.config I have:
<urlMappings enabled="true">
<add url="~/Animals/Dog.aspx"
mappedUrl="~/Animal.aspx?Animal=Dog" />
</urlMappings>
Run the page and the image doesn't show, because the ImageURL is incorrectly rebased.
The solution is to do the rebasing yourself; there's a whole thread on about ASP.NET Paths on
Rick Strahl's Blog; there's a nice FixupUrl() method in the comments.
Alternatively you can use the VirtualPathUtility:
i1.ImageUrl = VirtualPathUtility.ToAbsolute("~/Images/foo.jpg");
I've just downloaded and installed Windows Live Messenger and have come to the conclusion that the insaller sucks. Half way through a dialog pops up indicating that I must close some programs: Outlook, and one isntance each of Word and IE (I have several open). I close them, wondering why I haven't been asked to close the other instances, and hit Retry. It does so, but then another dialog asking for more IE closures. Why can't it detect them all and ask me to close them all? Does they even need to be closed anyway? What happens if I hit...
At long last, the lasted Al and Dave book is out (my copies have just arrived). ASP.NET 2.0 Illustrated isn't just an update from the old beta books, but is around 80-90% rewrite. It does reuse some code and text from the previous books, but we decided not to just update it as we wanted to expand the samples and text and make it a more practical book for those coming to ASP.NET 2.0, either from an existing ASP.NET background, or one with no ASP.NET.
You can download the samples from my (slow) server or from some faster servers linked from...
SQL Server 2005 supports notifications, allowing it to tell you when data has changed. This is useful for many reasons, invalidating the ASP.NET cache for example. Someone asked me about this at DeveloperDeveloperDeveloper (which was most excellent as usual) and Al & I also had a query about it. The latter query was for a SiteMap provider that uses a databases, which needs to be notified when the data it depends upon changes. Since I always have to look up the steps I thought I'd blog them so it's easy to find.
Cache invalidation works with both full and express editions...
I've known about this practice for a long time. Those of us involved in the publishing industry understand it. Publishers want to sell books and the best way to do that is have them prominently displayed. It's called advertising and you have to pay for that. The same is true with online stores. OK there's no physical display, but the effect is the same; the publisher pays, either upfront or by offering deep discounts to the store. So remember, everything you buy, including books, is subtly advertised in some way. We're all suckers. [via Neil Gaiman]
[Listening to: Bob Harris Country...