Getting back in the swing...
Some very kinds notes lately from folks who noticed my ever changing MSN Messenger Name. I've indeed been ill lately, having some diabetes troubles and unusual associated vertigo. I was literally propped up all weekend, as lying down induced horrible spinning (presumably of the room, although possibly me). I'm getting better slowly, but still sense something's wrong. Pretty sure I'll be back in the swing again for my presentation to the Cleveland .NET Users Group next week, and certainly for PDC. I'd hate to miss it!
In my stupor I've been continuing into the depths of ASP.NET, this week working on a (possibly) rudimentary visual inheritance with Web Forms.
Something like this:
MyNorthwindBanknamespace
{
public class SomeWonderfulBasePage : Page
{
protected override void OnInit(System.EventArgs e)
{
this.Controls.AddAt(0, LoadControl("head.ascx"));
base.OnInit(e);
this.Controls.Add(LoadControl("foot.ascx"));
}
}
public class SomeWonderfulBaseControl : UserControl
{
public new SomeWonderfulBasePage Page
{
get { return (SomeWonderfulBasePage )base.Page; }
}
}
}
I wonder if this is a valid and reasonable way to proceed, or if there's something about it that might bite me?
About Scott
Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.
About Newsletter
Anyway, think of the discomfort as being compensation for that ginormous brain of yours - There are tons of people out there who don't have diabetes, but they also don't have your talent :)
Illness is always a tough thing, but it could be worse.
You, Scott Hanselman, could be *average*.
But, you aren't. There's always a mix of the good with the bad...
Hang in there, mister.
Seriously Scott, I'm sorry to here you are not feeling well. I hope we shall see you at class Friday. I don't know how else I could spend a Friday evening :-(.
Hope you get well soon. I'm looking forward to meeting you at PDC.
RE: Visual Page Inheritance
I wrote an article a long time ago for Code Project about this very thing. (It is very old and isn't quite right anymore.) The technique works well, but there are a number of things you will deal with. One is override AddParsedSubObject so you can pickup the controls from the code-infront page better.
The other one is that the form postback bug in ASP.NET 1.1 gets very annoying.
I actually went so far as to store the template in a XHTML file and plop in the content from the .ASP page. Kind of a backwards Master Pages technique.
Good luck with everything!
PS. I still haven't tried the Radio comments importer. Too busy... ;)
The deal is that almost Doctors do not know much about Vertigo. But there is a Dr in the Portland area that really knows his stuff. See the web link below. I was lucky enough to know someone that had visited Dr Epley. Know one else even had a clue as how to help me. Go see this guy he knows how to help you. I took about two months until I wasn't at least a little bit dizzy.
http://www.earinfosite.org/
Comments are closed.