Showing posts with label Programming. Show all posts
Showing posts with label Programming. Show all posts

October 12, 2006

Attributes.Add Lameness

Had some trouble today with *.Attributes.Add and using an ampersand &.

The problem is Attributes.Add and here's what I found:

Using Reflector to trace through System.Web.UI.WebControlsWebControl.Attributes to see if it was doing any kind of encoding turns out that
System.Web.HttpUtility.HtmlAttributeEncode is called on any text added via Attributes.Add. HtmlAttributeEncode turns & into & and turns double quotes (") into "
Lameness I say! Anyways the solution I used was to register a startup script and place my onClick in a function then on my attributes.add I just call the javascript function. Works well, and note that this happened to me on ASP.NET 1.1, not sure if it occurs in 2.0

kick it on DotNetKicks.com

kick it on DotNetKicks.com

October 11, 2006

Quick Book Review

Just finished reading:

  • Cascading Style Sheets 2.0 Programmer's Reference
    by Eric A. Meyer
    McGraw-Hill/Osborne © 2001 (334 pages) : ISBN:0072131780

If you know Eric Meyer then you know he's a well known CSS professional. His book is undoubtedly good, even research Amazon.com to see the user reviews.

I was looking for an intermediate introduction to CSS. I have a general knowledge of CSS and use it quite often when designing websites. Recently I heard all about CSS layouts and that they are the way to go. Since I was not too familiar with using CSS for layouts, or the extent and benefits of CSS, I decided to pick up this book. Glad I did because Eric goes over everything you'll need to know and then some. Be forewarned though that beginners who have never touched CSS before may find it hard to catch on, this is certainly an intermediate to expert reference book. I'll be keeping this book close knowing I will be using it for reference quite often. Remember to check his website for great examples.

kick it on DotNetKicks.com