Scott Hanselman

Getting back in the swing...

October 09, 2003 Comment on this post [9] Posted in ASP.NET | Diabetes | Speaking | PDC
Sponsored By

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:

namespace MyNorthwindBank
{
  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.

facebook twitter subscribe
About   Newsletter
Hosting By
Hosted in an Azure App Service
October 09, 2003 4:38
I did notice your Messenger name today. Be well my friend. I'm not doing so great either. We'll both hang in there.
October 09, 2003 4:42
Hope you feel better soon. I can't wait to see your presentation in Cleveland.
October 09, 2003 8:28
Sorry about the troubles... I get bouts of vertigo myself that last for several days at a time, so I know what it's like, and it's horrible.

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.
October 09, 2003 8:40
Imagine what it takes for the brain to cause a spinning sensation. The coordinate transformations to make it appear that the world around you is spinning - all in real time! It's amazing!

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 :-(.
October 09, 2003 10:07
Scott,

Sorry you're not well. Hope tomorrow you feel much better!

Scott
October 09, 2003 13:40
I'll never be able to imagine the things you go through, saying 'Get well soon' just doesn' seem to be correct. So I say.... errmmmm... wish I had a book that tells me how to say encouraging words without being too sappy right now. :P Well you've been through it, you'll make it through, I'll be seeing you. ;)
October 09, 2003 22:59
Scott,

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... ;)
October 13, 2003 5:30
About the Vertigo. I woke up one day with a sever case of vertigo. It was the worst medical experience my life. I felt like my head was tied behind my back. It was just like that. I went to bed feeling fine and then just woke up completely disoriented. My wife took me into the emergency room. She had to literally carry me to the car. I couldn't tell where I was going. She pushed me in a wheel chair and I felt like I was going in circles the whole way and dry heaving the whole way. My case of vertigo turned out to be a inner ear attack by some virus, referred to as Acute labyrinthitis.

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/
October 14, 2003 11:02
Scott, we've created a framework based on the very concept you wrote about... The trick is to declare a BODY runat=server, then locate it and insert header and footer controls as required. We actually took it a step further and defined ASCX templates with target content placeholders. There are some gotchas here and there, but by and large: awesome, dude!! Best, Keith

Comments are closed.

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.