Developer .NET UPDATE—brought to you by the Windows & .NET Magazine Network
This Issue Sponsored By
DevConnections-- Win a Harley Davidson Motorcycle
New Exchange Event from Windows & .NET Magazine Connections
September 19, 2003--In this issue:
1. Developer .NET Perspectives
- Creating a New Section in the Community Starter Kit
- Active Directory eBook Chapter 4 Published!
- Want to Get a Free SQL Mag Portfolio?
- New--Mobile & Wireless Road Show!
4. New and Improved
- Object-Relational Mapping for Many Database Types
- Tell Us About a Hot Product and Get a T-Shirt!
5. Contact Us
- See this section for a list of ways to contact us.
Sponsor: DevConnections--Win a Harley Davidson Motorcycle
DevConnections = Microsoft ASP.NET Connections + Visual Studio Connections + SQL Server Magazine Connections + Microsoft Office System Connections. Register early and you will receive all four conferences for the price of one. Choose from over 170 sessions. All session and speaker information and the conference brochures are online.
This is your chance to get the latest roadmap from Microsoft, learn practical tips and insights that you'll use on the job immediately, and network with the top gurus in the industry. Plus, you may win a brand new Harley Davidson motorcycle among other cool giveaways at the prize drawing held in the exhibit hall.
DevConnections is held Oct 12 - 15 in Palm Springs at the beautiful La Quinta Resort and Club. Don't miss this opportunity to get the training you need to stay on top of today's technology and keep your competitive edge on the job.
Register today and you'll get:
- 4 Conferences for the Price of 1
- Opportunity to win a Harley and other giveaways
- Free one-year subscriptions to MSDN Magazine and Dr. Dobb's Journal
Register online or call 800-438-6720 or 203-268-3204.
1. Developer .NET Perspectives
In "Making Minor Modifications to the Community Starter Kit" (http://www.winnetmag.com/articles/index.cfm?articleid=40289), I started discussing the ASP.NET Community Starter Kit's site-customization and administration tools. This kit is one of several starter kits that are available for free from the Microsoft ASP.NET Web site (http://www.asp.net). Although many people use these starter kits to initially implement a site that they customize, many more people look to the starter kits as a robust set of sample projects. As part of this column, I've been examining how to customize the Community Starter Kit with the goal of learning about its implementation so that you can mimic it in your customized applications.
With this goal in mind, let's look at how to add a new section to the Community Web Site. Access the administration pages for your sample site by logging on as Admin and navigating to the main Admin page. Click the Edit Sections link, which brings you to a display that contains links to each of the primary pages associated with a section in the site.
I showed you how to make modifications to an existing site (i.e., the default home page) in "Making Minor Modifications to the Community Starter Kit," so let's add a new section to the site. Click the Add New Section link. In the page that appears, you need to define key elements for your new section. In the Name text box, enter a name for your new section, such as CustomSection. The Community Starter Kit will use this name in the URL that's associated with the new section. However, this name has no relationship to the physical path for the actual implementation of the section. Remember that the Community Starter Kit manages all the pages as virtual references through the database. For more information about the kit's use of virtual references, see "Understanding the Community Starter Kit's Source Code" at the following URL:
Unlike when you edit an existing section, when you create a new section, you can define the type of section to create. When looking through the list of types, you'll notice that all the predefined section types are already present in the Community Starter Kit's default configuration. If you were to select one of the predefined section types, such as Articles, the kit would map a new database entry and use the existing Articles section's files. Thus, the kit would simply support having a second page formatted the same as the default Articles page, but which contained different data. For this example, you want to create a truly custom display that isn't based on any of the existing templates, so select Custom Module.
Now, add your new section by clicking Add. From the Edit Sections page that appears, select the link to your new section. This link should take you to the overall framework for your new section. You'll notice that the central section has been replaced with an error message that states the customsection.acsx Web control is missing. The control is missing because you have to add a custom control to your Community Starter Kit's project files. Keep in mind that when you use the administration interface to add a section, you're working within the architecture of the community site. The administration interface simply lets you designate the default page in each section. The logon/logout page, search functionality, and other capabilities not represented in a default page aren't editable from the interface. In addition, although the administration interface lets you select which theme to apply, it doesn't support customizing the control that the section uses for the theme. Thus, to create a more customized set of pages, you need to use Visual Studio .NET Enterprise Architect (VSEA) to add pages outside the kit's framework.
Let's begin by opening the Community Starter Kit in VSEA. In Solution Explorer, navigate through the project directory structure to Communities, Community1, CustomModules. The code expects to find custom modules in this location. Right-click the CustomModules directory in Solution Explorer, then select Add, Add Web User Control to start the Web User Control Editor. This editor is similar to the Page Editor, except that instead of working within a display grid, you're working in the equivalent of a word-processing UI. The Web User Control Editor will add elements to the upper left corner by default, so you'll need to insert linefeeds to move elements down and spaces and tabs to move them to the right.
You can add any controls or input forms that you want to this .ascx page. You can include custom data-access logic, custom controls, and custom forms--basically, whatever custom code you want. I'm not going to go through the steps of creating a custom page. The key is that you can create your custom page within a User Web Control. The control can include links to other sections or pages that you create within your community site.
Note that Web user controls and Web custom controls are two very different items. User Web Controls are project-specific objects that let you customize the look and feel of a portion of a page. Custom Web Controls are objects that let you create controls that you can add to VSEA, thereby letting you use those controls across different projects. For an introduction to User Controls and a comparison of Web user controls and Web custom controls, check out these URLs, respectively:
Although I've discussed ASP.NET applications in the past few issues of Developer .NET UPDATE, I want to mention that WinForm developers can also create a generic UI, then swap out the control structure within the display. WinForm applications can do this UI swapping within a frame called UserControls. A good introduction to UserControls is available at this URL:
At this point, I could expand my coverage of the Community Starter Kit to go beyond working within the site's architecture. However, my current plan is to look at how to deploy this site from your development environment to your production environment, including how to deploy the site when a firewall separates those environments. I welcome any feedback or questions related to the Community Starter Kit and will happily cover any other topics you'd like.
Sponsor: New Exchange Event from Windows & .NET Magazine Connections
Windows & .NET Magazine Connections will co-locate with the brand new Exchange Connections conference from Nov 2-5 in Orlando, FL. Register early and you'll receive access to both events for one price!
Attendees will have a chance to win a FREE 5 day Las Vegas Vacation including airfare for two.
Connections promises to deliver 100% pure technical content about cutting edge technology with real world solutions that you can use in your job today. To stay competitive, you need to invest your time to keep pace with the latest technology, tips, and tricks. Connections will give you the edge. Don't let this opportunity pass you by.
Register today and you'll get:
- 2 Conferences for the Price of 1
- Opportunity to win a FREE Las Vegas vacation plus other giveaways
- Free one-year Windows & .NET Magazine subscription
Register online or call 1-800-505-1201 or 203-268-3204.
(brought to you by Windows & .NET Magazine and its partners)
The fourth chapter of Windows & .NET Magazine's popular eBook Windows 2003: Active Directory Administration Essentials is now available at no charge! Chapter 4 looks at what's inside Windows Server 2003 forests and DNS. Download it now!
Take our quick 2-minute survey on backup and disaster recovery and you’ll be entered into our drawing to win a free SQL Server Magazine zippered portfolio! It’s fast and easy, so click here now!
(brought to you by Windows & .NET Magazine)
Learn more about the wireless and mobility solutions that are available today! Register now for this free event!
4. New and Improved
by Sue Cooper, [email protected]
Evaluant announced Data Tier Modeler (DTM) 3.0, an object-relational mapping tool for Windows .NET Framework developers. You can design your applications by using Unified Modeling Language (UML) or XML, and DTM generates your data-access layer and your business objects source code in C# and generates SQL scripts to build or update your database. DTM lets you map all UML entities, such as relation, inheritance, interface, polymorphism, aggregation, composition, association classes, and singletons. DTM offers full integration with Visual Studio .NET. DTM supports Microsoft SQL Server, Oracle, DB2, Microsoft Access, and MySQL databases. Contact Evaluant in France at [email protected]
Have you used a product that changed your IT experience by saving you time or easing your daily burden? Tell us about the product, and we'll send you a Windows & .NET Magazine T-shirt if we write about the product in a future Windows & .NET Magazine What's Hot column. Send your product suggestions with information about how the product has helped you to
Free message-level Exchange recovery web seminar October 9th
Free Download - NEW NetOp 7.6 - faster, more secure, remote support
Eliminate spam once and for all. MailFrontier Anti-Spam Gateway.
5. Contact Us
This email newsletter is brought to you by Windows & .NET Magazine, the leading publication for IT professionals deploying Windows and related technologies. Subscribe today.
Copyright 2003, Penton Media, Inc.