tailieunhanh - Wrox’s ASP.NET 2.0 Visual Web Develope 2005 Express Edition Starter Kit phần 3

Đối với trường hợp mặc định, bạn chỉ cần nhập vào tên máy, hoặc bạn có thể truy cập vào một ví dụ đặt tên (chẳng hạn như Microsoft từ xa dữ liệu Engine (MSDE) hoặc SQL Server Express dụ) bằng cách gắn thêm tên dụ tên máy ngăn cách bởi một dấu gạch chéo ngược. Hình 1-19 cho thấy một kết nối với các ví dụ mặc định của SQL Server chạy trên một máy từ xa có tên là DELBOY | Chapter 2 It has taken a while to fully describe each step of the process of starting to build a Master Page. However this example should give you a feel for the way that the editing features of VWD work how to create new items and how to work with the Properties and other windows. You have seen how you can edit a page in a range of ways and while in different views Source view or Design view . In later sections of this book you will see somewhat less detail for each step of the examples because you are now familiar with the basics of working with VWD. Choosing the Correct Element and Control Type One point to notice is that the content of the page is a mixture of item types. It contains normal HTML elements such as the body element and the various table tr and td elements you added to generate the page layout structure. Because your code will not manipulate or reference any of these elements there is no reason for them to be anything other than simple HTML. Elements that code will manipulate or reference must be declared as server controls. In other words they must contain the attribute runat server in their declaration as the ContentPlaceHolder control in the example does. You will use predominantly server controls throughout the pages you build in . However server controls do exert much more load on the server when generating the page compared to just declarative HTML and other content. Therefore where they are not required they should be avoided and the standard HTML controls used instead. This is what happened when you used the Image control from the HTML section of the Toolbox for the images in the Master Page. The Image control in the Standard section of the Toolbox is a server control yet server-side access is not a requirement for these images in the page. The Master Page you are building cannot be viewed directly. If you try to open it in a Web browser you will see a message stating that This type of page is not served. Later you .

TỪ KHÓA LIÊN QUAN