ASP.NET DropDownList 控件

ການສະແດງການ ແລະ ການນໍາໃຊ້

ປະກອບງານ DropDownList ນຳໃຊ້ສຳລັບການສ້າງລາຍການປົກຄອງ.

ປະກອບງານ DropDownList ມີພາກສິ່ງທີ່ສາມາດເລືອກໄດ້ທຸກຢ່າງໄດ້ຖືກກໍານົດໂດຍປະກອບງານ ListItem!

ຄຳແນະນຳ:ປະກອບງານນີ້ສາມາດວາງຂໍ້ມູນທີ່ມີການປະສົບປະສານ!

ປະສົງ

ປະສົງ ອະທິບາຍ .NET
SelectedIndex ຈຳນວນທີ່ສາມາດເລືອກໄດ້ 1.0
OnSelectedIndexChanged ການດຳເນີນຂອງຫົວວິທີທີ່ຖືກດຳເນີນເມື່ອ index ຂອງຫົວວິທີທີ່ຖືກເລືອກໄດ້ປ່ຽນ. 1.0
runat ກຳນົດວ່າປະກອບງານນີ້ເປັນປະກອບງານທີ່ບໍລິການທີ່ເຄື່ອງ. ຕ້ອງການກະຕຸ້ນເປັນ "server". 1.0

ListControl

AppendDataBoundItems, AutoPostBack, CausesValidation, DataTextField,
DataTextFormatString, DataValueField, Items, runat, SelectedIndex, SelectedItem,
SelectedValue, TagKey, Text, ValidationGroup, OnSelectedIndexChanged

ListControl Control ລວມທັງທຸກປະສົມປະສານງານທີ່ສົມບູນຂອງ List Control. Control ທີ່ອາດລວມທັງ: CheckBoxList, DropDownList, ListBox ແລະ RadioButtonList Control.

ເພື່ອການອະທິບາຍຄົບຖະແຫຼງ, ກະລຸນາເຂົ້າຊົມ ListControl.

Web Control

AccessKey, Attributes, BackColor, BorderColor, BorderStyle, BorderWidth 
CssClass, Enabled, Font, EnableTheming, ForeColor, Height, IsEnabled 
SkinID, Style, TabIndex, ToolTip, Width

ເພື່ອການອະທິບາຍຄົບຖະແຫຼງ, ກະລຸນາເຂົ້າຊົມ Web Control.

ທີ່ປະກອບໃນ Control

AppRelativeTemplateSourceDirectory, BindingContainer, ClientID, Controls 
EnableTheming, EnableViewState, ID, NamingContainer, Page, Parent, Site 
TemplateControl, TemplateSourceDirectory, UniqueID, Visible

ເພື່ອການອະທິບາຍຄົບຖະແຫຼງ, ກະລຸນາເຂົ້າຊົມທີ່ປະກອບໃນ Control.

ຄວາມຈະເລີນ

DropdownList
ໃນບັນທັດນີ້ພວກເຮົາຖືກການສະເໜີ DropDownList Control ໃນໂອເອັສເພັກ. ເມື່ອພວກເຮົາສ້າງຄະນະກຳມະການເຫດການ, ພວກເຮົາຈະສະແດງຄວາມຂອງ Label Control ແລະວັດຖຸທີ່ໄດ້ເລືອກໃນ Click Event.