Databases Reference
In-Depth Information
LISTING 4.9
Continued
<WhereParameters>
<asp:QueryStringParameter QueryStringField=”ID”
Name=”SupplierID” DbType=”Int32” />
</WhereParameters>
</asp:EntityDataSource>
</asp:Content>
You can see the actual page produced by the markup from Listing 4.9 in Figure 4.2.
FIGURE 4.2
Supplier Information page.
Note that you could have achieved the same result by creating a composite Supplier
entity template, Suppliers.ascx , similar to the Customer entity template shown in
Listing 4.8. The advantage of creating a supplier entity template is that it will work with
the built-in page templates, discussed in Chapter 6, “Page Templates,” which implement
data access logic and eliminate the need to create custom pages altogether.
Dynamic Entity Templates
If you need to display all fields for a particular entity and the exact layout of the fields on
the form is not very important, you can take advantage of the dynamic entity templates
instead of creating custom templates discussed earlier in this chapter.
Dynamic entity templates are included in each Dynamic Data project out of the box.
Figure 4.3 shows the Supplier page produced by the dynamic template, called
Default.ascx , located in the DynamicData\EntityTemplates folder of the Web
Application.
 
 
Search WWH ::




Custom Search