Programming is Passion,Software Development is an Adventure- Willy David Jr

Programming is Passion,Software Development is an Adventure- Willy David Jr

WebParts in ASP.NET 2.0

 

Creating Web Parts in ASP.NET 2.0 is one of the cooling thing I've ever seen in ASP.NET 2.0. I don't know if it was a new feature in 2.0 for ASP but it was nice development control for me. I think it was the same implementation with DotNetNuke modules, where modules where added to the site one by one and you can control it's appearance and where you want your modules to reside. The same way goes with CatalogZone control in ASP.NET. Just add two add CatalogZone in your page, then try to put an image for example to the first CatalogZone and leave blank your second CatalogZone. Before you run the site, don't forget the WebPartManager control to be added on the same page. Then add this code at your Page_Load event handlers:

this.WebPartManager1.DisplayMode = WebPartManager.DesignDisplayMode;

To disable drag and drop mode for the two catalog zones, change DesignDisplayMode to BrowseDisplayMode.

Then build and run the site. It was cool that you can actually drag and drop the pictures on the two CatalogZone dynamically!

Although it was much cooler if you are using AJAX enabled site where you will not notice any postback from your site.

Cool?

- Willy David Jr

Comments

lamia said:

Yep, it's really cool! Portlets are the counterpart for Java. It's too bad that our team decided to take it out of the project for the mean time so we could save time in development(I think we were having firewall issues).

# February 11, 2008 6:13 PM

zxevil172 said:

3476jM      Were a U from?

# March 27, 2008 6:29 PM