WPF/E

Windows Presentation Foundation has obvious benefits both for creating rich user experiences in Windows and for ease of development, but how do those advantages translate to the web? Most people would give the answer that WPF is just Flash for Windows. Just take the application in Windows and rewrite it in Flash. Now let’s say that we’ve invested a lot of time training you and me on how to write WPF applications, and a customer comes back and says they want the same quality of user experience in a web app. We’d say that a different team of people would need to come up to speed on Flash and build it out in Flash. This would effectively duplicate our efforts. Do you think they will pay us double? They probably would not. What would be great is if there was some way to leverage our expertise in WPF for the web. This is where Windows Presentation Foundation Everywhere (WPF/E) fits into the picture.

Microsoft today announced the availability of the development center for WPF/E on MSDN. It is currently only a Community Tech Preview, but by the end of 2007 there will finally be a viable competitor to Flash.

More information can be found here:

http://msdn2.microsoft.com/en-us/asp.net/bb187358.aspx

Input type=file value

I had a bug this morning where the input field for a file upload box was being cleared during a postback to the server. The bug suggested that the server action should not clear the field because we weren't uploading the file yet. In ASP.NET you cannot change the value of that field.

After thinking about this for a while, it makes sense. The vulnerability would be that some rogue web page would set the value to something private like your Quicken datafile and you'd unknowingly upload that to the server.

It is good that I as a programmer cannot set a value to this field, but am I looking at this correctly? Can anyone out there confirm that this is the expected behavior of <input type="file"> ?

How to take down a web site temporarily

Usually I rename web.config to web.config.bak while I make major changes to a web site. This causes an error page to anyone hoping to visit the site that I am modifying. In ASP.NET 2.0 you can take your web site offline and redirect traffic to a page that you can control its content (i.e. not an ASP.NET error page) simply by adding a web page called App_Offline.htm.

Thanks to Erik Porter's Blog for pointing this out.

HTML Validation: Choosing a DOCTYPE

A while back, I asked the question of what the XHTML 1.1 doctype is. The answer is found on the W3.org site here. It is this:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

They suggest that the xmlns and xml:lang attributes be set for the html tag like this:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

Also, if you are up to it, add the xml declaration to it (<?xml version="1.0" encoding="UTF-8"?> at the top).

I am interested in this because I've been working on redesigning my main web site to make it more colorful, easier to update, and more modern in the code. When it's finished I'll be sure to post everywhere to let you know.