Adding webparts programmatically – the REAL way :^) – level 300

Johan made a great post about adding web parts in your code instead of having to declare it in the markup at design time.  This is very powerful, and I’m sure the prefered method for any system with roles.  You can programmatically decide whether a particular webpart should be available to that particular user.  If so, go ahead and add it.  I will definitely have to incorporate this feature into EZWeb when I release my 2.0 version.