Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Như bạn có với hầu hết các trang đến thời điểm này, sử dụng Site.Master là trang Master, sử dụng Visual C #, và cho phép tùy chọn để đặt mã trên một trang riêng biệt. Trong chế độ Design View, thêm một điều khiển FileUpload từ hộp công cụ và kiểm soát Label sẽ có một ID của FileUploadReport với một tài sản văn bản trống. Ngoài ra thêm một nút điều khiển với các thiết lập thuộc tính văn bản . | Chapter 12 Of course one big drawback is that there isn t a user interface so you re using a normal interface and also all your code is returned as one large lump of XML. So it s not exactly something you d stick into your application as it is without your users getting confused. Also you ll see that the weather report is much too detailed for your match reports. Ideally you d just want to be able to pick out say sky conditions and temperature and probably leave it at that. To be honest a few other pitfalls exist that would make a weather service difficult to integrate into your application. Not least is the fact that the weather service extracts the current weather and if you were to display this in your match reports you d need to make sure you saved the weather in the database alongside the match details otherwise you d be reading about Wednesday s match and seeing Friday s weather. Later in the chapter you ll look at creating some web services for the Wrox United application but for now you only need to understand that web services are freely available for very ordinary chores to all sorts of weird and wonderful things. If there is a URL with an .asmx file available you can access and use the web service in a standard way. And if you can access and use the web service in this standard way you can stick it in your application just as easily. The Life Cycle of a Web Service It s time to look at some theory behind what is happening here. This section strips down a web service to its basic essentials which is a four-stage process. Following that this section expands upon each stage and talks a little bit about the technologies and standards used at each step. The four-stage process of a web service is as follows as detailed in Figure 12-5 1. The client calls web service over a protocol. 2. The client sends the method to the server which contains instructions on what is needed from the web service. 3. The server returns values and or an acknowledgment that it has .