Image button found guilty of not being valid xhtml horror!!!

Standard

The .net image button seems so innocent but a trip over to w3c.org and the html validator soon exposes the terrible truth. Prepare yourself for this, sit down, have a large brandy ready… It renders border=”0″ even though you haven’t put one in there yourself! try it! Put any xhtml 1.0 transitional site into the validator:

http://validator.w3.org/

And watch in utter horror while your site is rejected as a bad example to kids everywhere.

So what is going on here? And is there anyway out?

Well after some digging I found an excellent article:

http://social.msdn.microsoft.com/Forums/en-US/netfxbcl/thread/ac098c63-61ff-4b53-b5ad-72cb2eb0f7f2

It turns out the validator is unrecognised as a browser type to asp.net and so is presented with html 4.0 instead of xhtml, hence the border=”0″ debarkle.

Is there a workaround? Yes there is either don’t use image buttons or put this in your web.config:

<browserCaps>
<
case match=W3C_Validator*>
TagWriter = System.Web.UI.HtmlTextWriter
W3CDomVersion = 1.0
</case>
</
browserCaps>

A solution to a weird problem, but necessary if like me you want that green tick 🙂

Flash Video not running on IIS 6 windows server 2003

Standard

Seen this one before but while chatting with some (tech) friends I discovered most seemed to think that this should just work out of the box, well unfortunately it doesn’t. But adding support on you windows driven website isn’t that hard, just a few short steps. So I thought it might be useful to explain here:

You need to add the .flv MIME type to IIS:

First click on the site to configure in IIS, right click – select “Properties”.

Under HTTP Headers Tab, select “File Types” button under the MIME Map section and select “New Type”

Lastly Type “.flv” as the associated extension and “video/x-flv” as the content type and Select “OK”

There you have it, flash videos should now work on that site. See you later

Cheers
Dave

SQL Server 2008 finally we can script data

Standard

I was at the UK launch of SQL Server, but a lot of that event seemed to focus on some very niche features, new location type data, the usual better performance stats and better reporting facilities.

While these are great, I dispair at the loss of the open table, now we open top 200 for editing. I understand that the open table was not efficient but it was handy when something has gone wrong at the 11th hour; so why not just give both options? you can do the top 200 on a production machine, but use the open table where you need to check out all the data.

I have been jeolous of mySQL for a while now, they had script objects and data; this was something I used to use in the 80’s with Artemis (awsome project management software) so disapointed that it didn’t exist in SQLServer. But now in SQL Server 2008 it’s there!!!! on the database name in the tree control select tasks/generate scripts. The wizzard take you through what you want select data in the wizzard and BINGO !  You get the structure of the database and the data, in a .sql file (text file) this is usually a fraction of the size of a database backup and as it’s in text format is really difficult to corrupt or have other problems.

Life is indeed great again!