abombss: You think MS will give me recongnition points for this?
Maybe... but the fix does not work (unfortunetly), because ViewPage.ViewData is of type System.Web.Mvc.ViewData, which is a wrapper around the underlying _viewData field and its type has no relation to the static type parameter of MasterViewPage<T>.
Cast the page to an IViewDataContainer to access the underlying object, which should then be able to be cast to the required strong ViewData type.
However a workaournd to this bug that allows use of ViewMasterPage<TSuperTypeOfPageViewDataType> should be possbile.
Create a class "MyViewMasterPage<T>" derived from ViewMasterPage<T>, with a single member
public new TViewData ViewData {
get {
IViewDataContainer page = this.Page;
TViewData d = page.ViewData as TViewData;
if (null == d) {
throw new InvalidOperationException(...)
}
return d;
}
}