Web files are specific to web applications and can either be requested dịch - Web files are specific to web applications and can either be requested Việt làm thế nào để nói

Web files are specific to web appli

Web files are specific to web applications and can either be requested by a browser directly, or are
used to build up part of the web page that is requested in the browser. The following table lists the
c02.indd 41 2/21/2014 7:04:19 AM
www.it-ebooks.info
42 ❘ chapter 2 Building an aSP.nET WEBSiTE
various web files you typically use in an ASP.NET Web Forms website and their extensions, and
describes how each file is used.
file type extension description
Web Form .aspx The workhorse of any ASP.NET Web Forms website; represents the pages that your users view in their browsers.
Master Page .master Enables you to define the global structure and the look
and feel of a website. You see how it can be used in
Chapter 6.
Web User Control .ascx Contains page fragments that can be reused in multiple
pages in your site. Chapter 8 is entirely devoted to user
controls.
HTML Page .html Can be used to display static HTML in your website.
Style Sheet .css Contains CSS code that enables you to style and format
your website. You learn more about CSS in Chapter 3.
Web Configuration
File
.config Contains global configuration information that is used
throughout the site. You see how to use the Web.config
later in this book.
Site Map .sitemap Contains a hierarchical representation of files in your site
in an XML format. The site map is used for navigation and
is discussed in Chapter 7.
JavaScript File .js Contains JavaScript that can be executed in the client’s
browser.
Skin File .skin Contains design information for controls in your website.
Skins are discussed in Chapter 6.
The next Try It Out exercise shows you how to add a new master page to the site, which is used
throughout the book.
try it out Adding Files to Your Site
1. If it is not still open, open the Planet Wrox website you created earlier by choosing File ➪ Open
Web Site. Make sure that you open the site from the filesystem, locate the folder that contains
your site (C:BegASPNETSite), and click the Open button.
2. In the Solution Explorer, right-click your site and choose Add ➪ New Folder.
commoN mistakes Make sure you click the actual site and not the
Web.config file or the Solution node at the top (see Figure 2-3) or you won’t
get the correct menu item.
c02.indd 42 2/21/2014 7:04:19 AM
www.it-ebooks.info
Working with Files in Your Website ❘ 43
3. Type MasterPages as the name of the folder and press Enter. Then right-click this new folder
and choose Add ➪ Add New Item. Alternatively, you can choose File ➪ New File or Website ➪
Add New Item from Visual Studio’s main menu, or you can click the new folder in the Solution
Explorer once to put the focus on it and then press Ctrl+Shift+A.
4. In the dialog box that appears, click Master Page and type Frontend as the name. VS automatically adds the .master extension for you when you add the file. Verify that under Installed
Templates you have selected the language you want to use for this site and that Place Code in
Separate File in the bottom-right corner is checked. Finally, click the Add button. The master page
is added to the site, and is opened automatically for you in the Document Window.
0/5000
Từ: -
Sang: -
Kết quả (Việt) 1: [Sao chép]
Sao chép!
Web files are specific to web applications and can either be requested by a browser directly, or areused to build up part of the web page that is requested in the browser. The following table lists thec02.indd 41 2/21/2014 7:04:19 AMwww.it-ebooks.info42 ❘ chapter 2 Building an aSP.nET WEBSiTEvarious web files you typically use in an ASP.NET Web Forms website and their extensions, anddescribes how each file is used.file type extension descriptionWeb Form .aspx The workhorse of any ASP.NET Web Forms website; represents the pages that your users view in their browsers.Master Page .master Enables you to define the global structure and the lookand feel of a website. You see how it can be used inChapter 6.Web User Control .ascx Contains page fragments that can be reused in multiplepages in your site. Chapter 8 is entirely devoted to usercontrols.HTML Page .html Can be used to display static HTML in your website.Style Sheet .css Contains CSS code that enables you to style and formatyour website. You learn more about CSS in Chapter 3.Web ConfigurationFile.config Contains global configuration information that is usedthroughout the site. You see how to use the Web.configlater in this book.Site Map .sitemap Contains a hierarchical representation of files in your sitein an XML format. The site map is used for navigation andis discussed in Chapter 7.JavaScript File .js Contains JavaScript that can be executed in the client’sbrowser.
Skin File .skin Contains design information for controls in your website.
Skins are discussed in Chapter 6.
The next Try It Out exercise shows you how to add a new master page to the site, which is used
throughout the book.
try it out Adding Files to Your Site
1. If it is not still open, open the Planet Wrox website you created earlier by choosing File ➪ Open
Web Site. Make sure that you open the site from the filesystem, locate the folder that contains
your site (C:BegASPNETSite), and click the Open button.
2. In the Solution Explorer, right-click your site and choose Add ➪ New Folder.
commoN mistakes Make sure you click the actual site and not the
Web.config file or the Solution node at the top (see Figure 2-3) or you won’t
get the correct menu item.
c02.indd 42 2/21/2014 7:04:19 AM
www.it-ebooks.info
Working with Files in Your Website ❘ 43
3. Type MasterPages as the name of the folder and press Enter. Then right-click this new folder
and choose Add ➪ Add New Item. Alternatively, you can choose File ➪ New File or Website ➪
Add New Item from Visual Studio’s main menu, or you can click the new folder in the Solution
Explorer once to put the focus on it and then press Ctrl+Shift+A.
4. In the dialog box that appears, click Master Page and type Frontend as the name. VS automatically adds the .master extension for you when you add the file. Verify that under Installed
Templates you have selected the language you want to use for this site and that Place Code in
Separate File in the bottom-right corner is checked. Finally, click the Add button. The master page
is added to the site, and is opened automatically for you in the Document Window.
đang được dịch, vui lòng đợi..
Kết quả (Việt) 2:[Sao chép]
Sao chép!
File Web được cụ thể cho các ứng dụng web và một trong hai có thể được yêu cầu bởi một trình duyệt trực tiếp, hoặc được
sử dụng để xây dựng một phần của trang web được yêu cầu trong các trình duyệt. Bảng sau liệt kê các
c02.indd 41 2014/02/21 07:04:19
www.it-ebooks.info
42 | Chương 2 Xây dựng một trang web aSP.nET
file web khác nhau mà bạn thường sử dụng trong một ASP.NET Web Forms trang web và phần mở rộng của họ, và
mô tả cách mỗi tập tin được sử dụng.
nộp mô tả kiểu mở rộng
Web Form .aspx các Workhorse của bất kỳ ASP.NET Web Forms website; đại diện các trang mà người dùng của bạn xem trong trình duyệt của họ.
Master Page .master Cho phép bạn xác định cấu trúc toàn cầu và những cái nhìn
và cảm nhận của một trang web. Bạn thấy thế nào nó có thể được sử dụng trong
Chương 6.
Web User Control ascx Có mảnh trang đó có thể được tái sử dụng trong nhiều
trang trong trang web của bạn. Chương 8 là hoàn toàn dành cho người sử dụng
điều khiển.
HTML trang .html có thể được sử dụng để hiển thị HTML tĩnh trong trang web của bạn.
Style Sheet .css Có mã CSS cho phép bạn phong cách và định dạng
trang web của bạn. Bạn tìm hiểu thêm về CSS trong Chương 3.
Cấu hình Web
file
.config Chứa thông tin cấu hình toàn cầu được sử dụng
trong trang web. Bạn thấy làm thế nào để sử dụng web.config
sau trong cuốn sách này.
Sơ đồ trang web .sitemap Có một đại diện thứ bậc của tập tin trong trang web của bạn
trong một định dạng XML. Bản đồ trang web được sử dụng để điều hướng và
được thảo luận trong Chương 7.
Tệp JavaScript js Có JavaScript có thể được thực hiện trong các khách hàng của
trình duyệt.
Skin file .skin Chứa thông tin thiết kế cho điều khiển trong trang web của bạn.
Skins được thảo luận trong Chương 6.
Các tiếp theo Try It Out tập thể dục cho bạn thấy làm thế nào để thêm một trang chủ mới cho trang web, được sử dụng
trong suốt cuốn sách.
thử thêm tập tin vào trang web của bạn
1. Nếu nó không phải là vẫn còn mở, mở trang web Planet Wrox bạn đã tạo trước đó bằng cách chọn File ➪ mở
trang web. Hãy chắc chắn rằng bạn mở trang web từ các hệ thống tập tin, xác định vị trí thư mục chứa
trang web của bạn (C: BegASPNET Site), và nhấp vào nút Open.
2. Trong giải pháp Explorer, bấm chuột phải vào trang web của bạn và chọn Add ➪ New Folder.
Sai lầm thường gặp Hãy chắc chắn rằng bạn nhấp vào trang web thực tế và không phải là
tập tin Web.config hoặc nút Giải pháp ở đầu (xem hình 2-3) hoặc bạn đã giành 't
nhận được các mục trình đơn chính xác.
c02.indd 42 2014/02/21 07:04:19
www.it-ebooks.info
làm việc với các tập tin trong website của bạn | 43
3. Loại MasterPages như tên của thư mục và nhấn Đi vào. Sau đó kích chuột phải vào thư mục mới này
và chọn Thêm ➪ Add New Item. Ngoài ra, bạn có thể chọn File ➪ New File hoặc Website ➪
Add New Item từ menu chính của Visual Studio, hoặc bạn có thể nhấp vào thư mục mới trong Solution
Explorer một lần để đặt trọng tâm vào nó và sau đó nhấn Ctrl + Shift + A.
4. Trong hộp thoại xuất hiện, nhấp vào Master Page và gõ Frontend như tên. VS sẽ tự động thêm phần mở rộng .master cho bạn khi bạn thêm các tập tin. Thẩm định rằng trong Installed
Templates bạn đã chọn ngôn ngữ mà bạn muốn sử dụng cho trang web này và Nơi luật trong
tập tin riêng biệt ở góc dưới bên phải được kiểm tra. Cuối cùng, nhấn nút Add. Trang chủ
được thêm vào các trang web, và được mở tự động cho bạn trong cửa sổ tài liệu.
đang được dịch, vui lòng đợi..
 
Các ngôn ngữ khác
Hỗ trợ công cụ dịch thuật: Albania, Amharic, Anh, Armenia, Azerbaijan, Ba Lan, Ba Tư, Bantu, Basque, Belarus, Bengal, Bosnia, Bulgaria, Bồ Đào Nha, Catalan, Cebuano, Chichewa, Corsi, Creole (Haiti), Croatia, Do Thái, Estonia, Filipino, Frisia, Gael Scotland, Galicia, George, Gujarat, Hausa, Hawaii, Hindi, Hmong, Hungary, Hy Lạp, Hà Lan, Hà Lan (Nam Phi), Hàn, Iceland, Igbo, Ireland, Java, Kannada, Kazakh, Khmer, Kinyarwanda, Klingon, Kurd, Kyrgyz, Latinh, Latvia, Litva, Luxembourg, Lào, Macedonia, Malagasy, Malayalam, Malta, Maori, Marathi, Myanmar, Mã Lai, Mông Cổ, Na Uy, Nepal, Nga, Nhật, Odia (Oriya), Pashto, Pháp, Phát hiện ngôn ngữ, Phần Lan, Punjab, Quốc tế ngữ, Rumani, Samoa, Serbia, Sesotho, Shona, Sindhi, Sinhala, Slovak, Slovenia, Somali, Sunda, Swahili, Séc, Tajik, Tamil, Tatar, Telugu, Thái, Thổ Nhĩ Kỳ, Thụy Điển, Tiếng Indonesia, Tiếng Ý, Trung, Trung (Phồn thể), Turkmen, Tây Ban Nha, Ukraina, Urdu, Uyghur, Uzbek, Việt, Xứ Wales, Yiddish, Yoruba, Zulu, Đan Mạch, Đức, Ả Rập, dịch ngôn ngữ.

Copyright ©2024 I Love Translation. All reserved.

E-mail: