Atlanta .NET Regular Guys

News

Brendon Schwartz - Email Me
Matt Ranlett - Email Me

Brendon Schwartz

MVP Logo
Community Kit for SharePoint
View Brendon Schwartz's profile on LinkedIn

Matt Ranlett

Matt Ranlett MVP Logo

Community Links

Useful Links

SharePoint 2007

ASP.NET 2.0

Atlanta Area Bloggers

BizTalk

SharePoint 2007 WebControls

SharePoint 2007 Development

Son of SmartPart - A SharePoint lifesaver

Son of SmartPartSo I've just wrapped up a quick little demo of how easy it is to code for SharePoint. Since the focus is on easy, and they're not yet 100% sure if we'd be using SharePoint vs a make-your-own ASP.Net 2.0 site, I decided the best way to go is to use the SmartPart and show off how you can write normal old ASP.Net code and still get it to show up in SharePoint.

Since we're thinking about an ASP.NET 2.0 site and everyone wants to write ASP.NET 2.0 code, I really had to use the Son of SmartPart, which includes the ability to display 2.0 User Controls and 2.0 Web Parts in SharePoint.  Since this is only a demo, I knocked up a quick little user control that replicates a report we have here.  To get SoSmartPart to "see" a user control, all you have to do is drop the .ascx into a UserControl directory on your SharePoint server.  I did that and PRESTO!  My control shows up in the list of available user controls in the SmartPart toolbox area.  I select the desired control and hit Apply.  BAM - error.

It turns out that you can't use the easy drag/drop data access components in a UC and get it to show up in SharePoint - maybe it has something to do with how the page gets rendered.  Whatever.  Change all those components to ones created dynamically in code (what's that, 5 lines?) and everything started working.  I showed this off to my demo audience and everyone is deeply impressed with how easy everything is.

Then I tell them that we can use ASP Web Parts in SharePoint - which gives us the flexibility to move to a ASP.NET 2.0 site if SharePoint gives us unexpected trouble.  And that the next version of SharePoint will be able to use ASP Web Parts natively without this SmartPart layer...  They love it.  I guess development will start soon.

Comments

KDR said:

Glad it went well babe!
# May 18, 2006 9:29 AM

Jan Tielens' Bloggings said:

I love reading SmartPart success stories! Matt Ranlett has a nice one: "So I've just wrapped up a quick...
# May 23, 2006 2:00 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)