KHO THƯ VIỆN 🔎

Visual web developer express edition starter kit part 2

➤  Gửi thông báo lỗi    ⚠️ Báo cáo tài liệu vi phạm

Loại tài liệu:     PDF
Số trang:         141 Trang
Tài liệu:           ✅  ĐÃ ĐƯỢC PHÊ DUYỆT
 













Nội dung chi tiết: Visual web developer express edition starter kit part 2

Visual web developer express edition starter kit part 2

Chapter 5Building the Delivery Costs PageThe page that displays the delivery costs is relatively simple. However, it takes its data not from a relatio

Visual web developer express edition starter kit part 2 onal database (as you have seen so far), but from an XML disk file named delivery. xml, stored in the XML-Data subfolder of the PPQ site. The good new

s is that you can use a data source control to access this data, and then bind a data display control to this data source control to display the data— Visual web developer express edition starter kit part 2

in much the same way as you did with a SqlDataSource control and the Gridview control in previous examples.The file delivery .xml looks like this:

Visual web developer express edition starter kit part 2

l verslon=’1.0R encoding="utf-8' ?>

Chapter 5Building the Delivery Costs PageThe page that displays the delivery costs is relatively simple. However, it takes its data not from a relatio

Visual web developer express edition starter kit part 2 ’ delivery-cosc=’3* /> name=*0ut of town* delivery-cost=*5.5* /> name="Wrong side of the tracks* dellvery-cost="7.5"name="0ut of state’ delivery-cost=

’15R />/>An XmlDataSource control can read this file and expose it as a rowset to which a Gridview control (and other list controls) can be data-bound Visual web developer express edition starter kit part 2

. However, life is not always as simple as this, as you will see in this example.1.Open the PPQ. master page in Design view, right-click on the Conten

Visual web developer express edition starter kit part 2

t Pl aceHolder control, andselect Add Content Page. Switch the new page to Design view, and save it as Del ivery. aspx using the Save Default2.aspx As

Chapter 5Building the Delivery Costs PageThe page that displays the delivery costs is relatively simple. However, it takes its data not from a relatio

Visual web developer express edition starter kit part 2 rom the XmlDataSource Tasks pane. Click the Browse... button next to the "Data file:" text box, and select the file delivery .xml from the XML-Data su

bfolder (see Figure 5-34).Figure 5-34: Selecting the delivery.xml file158Displaying Nested and XML Data2.Click OK, and then drag a Gridview control fr Visual web developer express edition starter kit part 2

om the Toolbox onto the page. In the Gridview Tasks pane, select XmlDataSourcel in the Choose Data Source drop-down list, and the Gridview shows the v

Visual web developer express edition starter kit part 2

alues of the attributes in each of the elements. Apply an Auto Format of your choice, and then select Edit Columns... in the Gridview

Chapter 5Building the Delivery Costs PageThe page that displays the delivery costs is relatively simple. However, it takes its data not from a relatio

Visual web developer express edition starter kit part 2 .5Out of state15Ai.Co Format...O-00M! Source: •nOờUSoxceíCotA^ee Oeta Source...Cdf-j Ldtj-ieOnd^.-i Ĩ cotjTTB□ Eoai* SeMctecFigure 5-35: Selecting Edi

t Columns ... in the Gridview Tasks pane3.Remove the first column (named id) by clicking on it in the Selected fields: list and clicking the button ne Visual web developer express edition starter kit part 2

xt to this list. Select the name column and change the HoadorText property' to Delivery Area. Then select the delivery-cost column and change the Head

Visual web developer express edition starter kit part 2

erText property to just Cost. This final column contains a value for the delivery' cost and should be displayed as a currency amount, so enter the for

Chapter 5Building the Delivery Costs PageThe page that displays the delivery costs is relatively simple. However, it takes its data not from a relatio

Chapter 5Building the Delivery Costs PageThe page that displays the delivery costs is relatively simple. However, it takes its data not from a relatio

Gọi ngay
Chat zalo
Facebook