Whidbey Watcher #4: Master Pages vs. May CTP

Seppur supportate sin dalle prime drop alpha, il supporto alle Master Pages è stato sostanzialmente modificato con l'avvento delle release CTP. Nelle versioni alpha, una web form dichiarava l'utilizzo di una master page mediante l'attributo Master della direttiva Page:

]]>

Sin dalla March CTP l'attributo Master è stato sostituito da un più eloquente MasterPageFile:

]]>

Questa modifica è maggiormente coerente con l'object model di ASP .NET 2, la cui classe Page espone le proprietà Master (a sua volta di tipo Page e a sola lettura) e MasterPageFile (di tipo string e modificabile a runtime). E' inoltre possibile modificare la master page da utilizzare per l'intera applicazione (od una sua sezione) mediante l'uso dell'elemento pages nel file di configurazione. Suscita una certa sorpresa, però, leggere in MSDN Library che l'attributo atto a questa operazione è rimasto quello originale, ossia master; peccato che una "roba" del genere:

Manda su tutte le furie il runtime di ASP .NET che risponde:

Parser Error Message: Unrecognized attribute 'master'.

"Poco male", direte voi... In effetti la prima sensazione è che MSDN sia obsoleto e che anche per l'elemento pages l'attributo sia stato cambiato. Provando, però:

ASP .NET non fa una piega e ribadisce:

Parser Error Message: Unrecognized attribute 'master'.

Considerando che anche Visual Studio 2005 ha qualche problema con le master pages (es: è "sparito" il supporto alle master page innestate), credo che per veder migliorare la situazione si debba (im)pazientemente aspettare la beta1. Se son rose...

Technorati Tags: ,

posted @ martedì 22 giugno 2004 00:10

Print

Comments on this entry:

No comments posted yet.

Your comment:



 (will not be displayed)


 
 
Please add 1 and 5 and type the answer here:
 

Live Comment Preview:

 
«aprile»
domlunmarmergiovensab
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011