Ack, it's been a while since I've had a chance to make an entry here, but I've been heads down in a project for a major Santa Clara company....
I've got a stack of tips and techniques to share, but I'll be doling them out slowly as I have a chance to recode them. (Most of my blog code ideas come from client work. However to avoid any IP or NDA issues, I recode all code samples on my own time, with my own machine before posting them here.)
Ok, so here's the tip for today.... You know how when you add an out-of-the-box web part that requires configuration you get a nice little message in the web part display that you need to configure it, and a link to open up the toolpane? Add a Page Viewer web part to your site and you'll see what I mean.... Well here's how to add one of those links. This is really useful in exception handling for configuration related exceptions too....
In your RenderWebPart override check to see if your part is configured, if not output something like this:
output.Write(@"Web Part not configured: <a target=""_self"" href=""javascript:MSOTlPn_ShowToolPaneWrapper('1','129','g_" +
this.StorageKey.ToString.Replace("-"c, "_"c) + @"');"" target=""_self"">click here</a> to configure<br>");
Pretty darn simple huh?
-Andy