Figure 6-11 presents some common properties for working with list cont dịch - Figure 6-11 presents some common properties for working with list cont Việt làm thế nào để nói

Figure 6-11 presents some common pr

Figure 6-11 presents some common properties for working with list controls. As you just saw, these controls contain Listltem objects that define the items in the list. Then, you can use the properties in the first table in this figure to get the selected Listltem object, the index of the selected object, or the value of the selected object.
This is illustrated by the examples in this figure. All three are for drop-down lists, but they work the same for any type of list control. Here, the first example gets the value of the selected item in the list. And the second example gets the text for the selected item in the list.
The third example gets the value of the selected item right after it is changed because it is coded in the event handler for a list control’s SelectedlndexChanged event. This event occurs any time the item that’s selected changes between posts to the server. If you want the page to post immediately when the user selects an item, you should set the AutoPostBack property of the control to True.
By default, the Selectedlndex property of a drop-down list is set to zero, which means that the first item is selected. In contrast, the Selectedlndex prop¬erty of a list box is set to -1 by default, which means that none of the items in the list are selected. Then, you can check if the user has selected an item in a list box by using code like this
0/5000
Từ: -
Sang: -
Kết quả (Việt) 1: [Sao chép]
Sao chép!
Figure 6-11 presents some common properties for working with list controls. As you just saw, these controls contain Listltem objects that define the items in the list. Then, you can use the properties in the first table in this figure to get the selected Listltem object, the index of the selected object, or the value of the selected object.
This is illustrated by the examples in this figure. All three are for drop-down lists, but they work the same for any type of list control. Here, the first example gets the value of the selected item in the list. And the second example gets the text for the selected item in the list.
The third example gets the value of the selected item right after it is changed because it is coded in the event handler for a list control’s SelectedlndexChanged event. This event occurs any time the item that’s selected changes between posts to the server. If you want the page to post immediately when the user selects an item, you should set the AutoPostBack property of the control to True.
By default, the Selectedlndex property of a drop-down list is set to zero, which means that the first item is selected. In contrast, the Selectedlndex prop¬erty of a list box is set to -1 by default, which means that none of the items in the list are selected. Then, you can check if the user has selected an item in a list box by using code like this
đang được dịch, vui lòng đợi..
Kết quả (Việt) 2:[Sao chép]
Sao chép!
Hình 6-11 trình bày một số tài sản chung để làm việc với các điều khiển danh sách. Như bạn thấy, các điều khiển chứa các đối tượng Listltem đó xác định các mục trong danh sách. Sau đó, bạn có thể sử dụng các thuộc tính trong bảng đầu tiên trong con số này để có được các đối tượng Listltem chọn, các chỉ số của các đối tượng được lựa chọn, hoặc giá trị của các đối tượng được chọn.
Điều này được minh họa bằng các ví dụ trong hình này. Cả ba đều cho các danh sách thả xuống, nhưng họ làm việc giống với bất kỳ loại hình kiểm soát danh sách. Ở đây, ví dụ đầu tiên được các giá trị của các sản phẩm được chọn trong danh sách. Và ví dụ thứ hai nhận được văn bản cho mục được chọn trong danh sách.
Ví dụ thứ ba được giá trị của các sản phẩm được chọn ngay sau khi nó được thay đổi bởi vì nó được mã hoá trong xử lý sự kiện cho sự kiện SelectedlndexChanged một danh sách kiểm soát của. Sự kiện này xảy ra bất cứ lúc nào các mục đó là lựa chọn thay đổi giữa các bài viết với máy chủ. Nếu bạn muốn trang để gửi ngay lập tức khi người sử dụng chọn một mục, bạn nên thiết lập thuộc tính của điều khiển là True AutoPostBack.
Theo mặc định, tài sản của một danh sách thả xuống Selectedlndex được thiết lập để không, có nghĩa là mục đầu tiên được chọn. Ngược lại, các prop¬erty Selectedlndex của một hộp danh sách được thiết lập để -1 theo mặc định, điều này có nghĩa rằng không ai trong số các mục trong danh sách được lựa chọn. Sau đó, bạn có thể kiểm tra xem người dùng đã lựa chọn một mục trong hộp danh sách bằng cách sử dụng mã như thế này
đ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: