Wednesday, October 29, 2008

VS 2008 Nested Master Page Support

Scott Guthrie has this to say about VS 2008 Nested Master Page Support:
"The good news is that VS 2008 fully supports nested master pages, and makes using them super easy. Going forward I recommend that almost all ASP.NET projects should advantage of this feature - since it can add tremendous flexibility to the UI of your projects."

Also mentions Open Source Templates.

Tips for Nested Master Pages and VS 2005 Design-Time

From Scott Guthrie. He has sample code to get around the problem of nested master pages not being editable in the visual designer. (Emphasis added.)
"One of the cool advanced features of the new Master Pages feature in ASP.NET 2.0 is the ability to nest them. For example, you could define a top-level master-page called “MainMaster.master” that defines a common logo header and footer, and defines a content-placeholder for the page called “content”. You could then define two sub-masters beneath it – one that provides a two-column layout model for the content (“TwoColumnMaster.master”), and one that provides a three-column layout model (“ThreeColumnMaster.master”). These two nested-master pages could then use the MainMaster.master file as the root master, and only adjust the layout within its content section (each would fill in the "content" placeholder and in turn add their own content-placeholders for sub-pages within it). The benefit of this approach is that if a designer ever changed the logo or top-level design of the site, they only have to update one file (MainMaster.master) and then have every page on the site automatically pick it up regardless of what master file they were based on.

"This nested model is pretty cool and powerful, and allows arbitrary levels of nesting. The only downside is that VS 2005 only supports nested master page editing in source-view, and doesn’t support it in the WYWSIWYG designer (note: obviously it does support editing them when the master-pages are not nested). "

Tuesday, October 28, 2008

Cool way to style HTML forms using CSS

Interesting article at Webmonkey. Uses things I've never heard of, including <fieldset> and <legend> tags, and using unordered lists and stylesheets to style the forms.

Saturday, October 25, 2008

CMS Ratings

This article publishes ratings of many different open source CMS systems.

Thursday, October 16, 2008

jQuery and ASP.NET AJAX UpdateRegion

When using jQuery with Microsoft ASP.NET AJAX UpdatePanel controls, you need code similar to this, in a script tag in the UpdatePanel. Otherwise events are fired multiple times, and event.preventDefault() does not work.

    // Necessary for update regions.
    Sys.Application.add_load(WireEvents);

    function WireEvents() {
// my jQuery "ready" event stuff goes here.
    }

Normally, of course, you would do the following:

    $(document).ready(function{} {
// my jQuery "ready" event stuff goes here.
    });

Tuesday, October 14, 2008

Google hosting javascript libraries

The AJAX Libraries API is a content distribution network and loading architecture for the most popular open source JavaScript libraries. By using the Google AJAX API Loader's google.load() method, your application has high speed, globaly available access to a growing list of the most popular JavaScript open source libraries including: