- Home
- Products
- Integration
- Tutorial
- Barcode FAQ
- Purchase
- Company
WEB PARTS: THE BUILDING BLOCKS OF PORTALS in .NET
WEB PARTS: THE BUILDING BLOCKS OF PORTALS Painting DataMatrix In Visual Studio .NET Using Barcode generation for ASP.NET Control to generate, create ECC200 image in ASP.NET applications. www.OnBarcode.comBarcode Printer In VS .NET Using Barcode creation for ASP.NET Control to generate, create Barcode image in ASP.NET applications. www.OnBarcode.com<HeaderStyle Font-Size="0.7em" ForeColor="#CCCCCC" HorizontalAlign="Center" /> <MenuVerbStyle BorderColor="#507CD1" BorderStyle="Solid" BorderWidth="1px" ForeColor="White" /> <PartStyle Font-Size="0.8em" ForeColor="#333333" /> <TitleBarVerbStyle Font-Size="0.6em" Font-Underline="False" ForeColor="White" /> <MenuPopupStyle BackColor="#507CD1" BorderColor="#CCCCCC" BorderWidth="1px" Font-Names="Verdana" Font-Size="0.6em" /> <PartTitleStyle BackColor="#507CD1" Font-Bold="True" FontSize="0.8em" ForeColor="White" /> </asp:WebPartZone> GS1 - 12 Maker In Visual Studio .NET Using Barcode creation for ASP.NET Control to generate, create GS1 - 12 image in ASP.NET applications. www.OnBarcode.comBarcode Maker In .NET Using Barcode drawer for ASP.NET Control to generate, create Barcode image in ASP.NET applications. www.OnBarcode.comAs we can see, this skin file definition for the WebPartZone control looks almost identical to the WebPartZone control definition that we saw in listing 2.13. However, the difference is that this information is now stored in a single place the skin file and that all WebPartZone controls can now use this style without having to each have their own embedded style sub-elements. One more step is required to apply a theme within an application; you must configure the application so that it knows which theme to use. This configuration can be constructed either at page level or at application level in the web.config file. Both of these options are shown in listing 2.15. Drawing Code-39 In .NET Using Barcode creator for ASP.NET Control to generate, create Code39 image in ASP.NET applications. www.OnBarcode.comGS1-128 Printer In .NET Using Barcode encoder for ASP.NET Control to generate, create UCC.EAN - 128 image in ASP.NET applications. www.OnBarcode.comListing 2.15 Configuration entries for themes can be set at either page or configuration file level.
Creating 1D Barcode In VS .NET Using Barcode maker for ASP.NET Control to generate, create Linear Barcode image in ASP.NET applications. www.OnBarcode.comGTIN - 8 Encoder In .NET Framework Using Barcode encoder for ASP.NET Control to generate, create GS1 - 8 image in ASP.NET applications. www.OnBarcode.com<%@ Page Language="C#" Theme="Blue" %> <system.web> <pages theme="Blue" /> </system.web>
Create DataMatrix In Objective-C Using Barcode printer for iPad Control to generate, create Data Matrix ECC200 image in iPad applications. www.OnBarcode.comDecoding DataMatrix In Java Using Barcode decoder for Java Control to read, scan read, scan image in Java applications. www.OnBarcode.comDeclaring a theme at page level
Encode Code 128B In Java Using Barcode drawer for Java Control to generate, create Code 128 image in Java applications. www.OnBarcode.comDecoding PDF 417 In C#.NET Using Barcode scanner for .NET framework Control to read, scan read, scan image in VS .NET applications. www.OnBarcode.comDeclaring a theme at configureation file level
Recognize UPC-A Supplement 5 In Visual Studio .NET Using Barcode recognizer for .NET framework Control to read, scan read, scan image in .NET framework applications. www.OnBarcode.comData Matrix Creator In Objective-C Using Barcode drawer for iPad Control to generate, create Data Matrix ECC200 image in iPad applications. www.OnBarcode.comThe benefit of using the web configuration file to declare themes is that you are required to declare it in only one place, whereas declaring it in each page would result in many declarations. Having the theme declared in many different places makes the code more difficult to maintain, because a developer would have to locate each place that it was declared when making changes to the theme. Now that you better understand web parts and have worked with them a bit, let s apply your new skills to the Adventure Works Cycles business. Barcode Printer In None Using Barcode encoder for Office Excel Control to generate, create Barcode image in Microsoft Excel applications. www.OnBarcode.comBarcode Generation In None Using Barcode drawer for Font Control to generate, create Barcode image in Font applications. www.OnBarcode.comADDING WEB PARTS TO THE ADVENTURE WORKS SOLUTION
Painting EAN13 In None Using Barcode generator for Excel Control to generate, create European Article Number 13 image in Office Excel applications. www.OnBarcode.comBarcode Reader In Visual Studio .NET Using Barcode recognizer for .NET framework Control to read, scan read, scan image in .NET framework applications. www.OnBarcode.comIn chapter 1 we created a data layer so that we could connect to SQL Server 2005 and retrieve information about the Adventure Works Cycles business. In this chapter we ll start putting that data to good use as we build the beginnings of a portal application Drawing GTIN - 13 In Visual Basic .NET Using Barcode drawer for .NET framework Control to generate, create EAN13 image in .NET framework applications. www.OnBarcode.comPrint Code 128 Code Set C In Java Using Barcode creator for BIRT Control to generate, create Code 128 Code Set B image in BIRT applications. www.OnBarcode.comADDING WEB PARTS TO THE ADVENTURE WORKS SOLUTION
based on the Adventure Works business. The portal that we will build throughout the course of this book will be built with small incremental steps. At the end of each chapter we ll apply a concept we ve learned by integrating an implementation of that concept into the portal. While each step may, in itself seem small, by the end of the book we will have created a portal that is filled with the features that clients have come to expect of portal-style applications. To implement the concepts you ve learned in this chapter, let s get back to your job at Adventure Works. Today the HR department has asked you to develop a small website that displays some of their line of business data such as a list of employees, departments, and information about the latest job candidates. They ve specified that initially the portal should be able to display the following data: A listing of all departments with employee numbers listed against each one A listing of all employees for a given department As an applications developer for Adventure Works you ve got ASP.NET 2.0 installed and you are all geared up and ready for the task. After discussions with the users, it is clear to you that while they have an immediate need for just these few features, their longer-term requirements are likely to be much larger. For this reason, you make the decision to use the web portal framework to build features as standalone components. Over time there will be the ability to harness the extensibility of the framework through features such as web part connections and verbs, to leverage components that we build today into tomorrow s features. NOTE
To complete this exercise you will need to create a project for the Adventure Works application. If you are comfortable with project creation and some of the new ASP.NET 2.0 features such as master pages, themes, etc., then you might just want to grab the project from the resources for this chapter that come with the book. If you would like to create the project for yourself to see how to implement these new features, you can complete the walkthrough titled Creating the Adventure Works Project in the appendix. Displaying all departments We ll address the first feature request, which was to create a web part that displays a listing of all departments from the Adventure Works database. Open the Adventure Works project and create a new folder named WebParts and add to it a new user control file named DepartmentListingPart.ascx. With the user control in design mode, add a GridView server control from the toolbox by dragging it onto the design surface. From the associated GridView tasks, choose the <New Data Source> option so that we can configure a data source to return the data that we need. At this time the Data Source Configuration Wizard starts up and the Choose a Data Source Type screen is displayed as shown in figure 2.15. We ve already created a data access layer to perform our data operations, so from this screen we choose the Object data source type and press OK. 60 WEB PARTS: THE BUILDING BLOCKS OF PORTALS Figure 2.15 The first step in the data source configuration wizard is to specify what type of data source we are binding to. The next screen in the wizard displays a listing of classes, allowing us to choose which business object contains the method to bind to the GridView control. This screen is displayed in figure 2.16. Select the AW.Portal.Data.DataLayer class and then press OK. Figure 2.16 When using the object data source control, we get to specify which class will provide the data.
|
|