所以我有一个包含 2 个项目的下拉列表:Path
和Queue
如果选择的项目是 a Path
,那么下一个 div 中显示的下一个内容是 textBox ( txtLocation
),如果是 Queue,那么我必须显示 DropDownList( cmbLocation
) 哪些项目是 xml 文件的一部分。
Type:
<dx:ASPxComboBox ID="cmbPathType" runat="server" Width="150px" TextField="TypeName"
ValueField="QueueMonitorConfigTypesID">
<DisabledStyle BackColor="LightGray" ForeColor="Black" />
<Items>
<dx:ListEditItem Text="Path" Value="Path" />
<dx:ListEditItem Text="Queue" Value="Queue" />
</Items>
<ValidationSettings ValidateOnLeave="false" RequiredField-IsRequired="true">
<RequiredField IsRequired="True" />
</ValidationSettings>
</dx:ASPxComboBox>
Location:
<dx:ASPxTextBox ID="txtLocation" runat="server" Width="150px">
<DisabledStyle BackColor="LightGray" ForeColor="Black" />
<ValidationSettings ValidateOnLeave="false" RequiredField-IsRequired="true">
<RequiredField IsRequired="True"></RequiredField>
</ValidationSettings>
</dx:ASPxTextBox>
<dx:ASPxComboBox ID="cmbLocation" runat="server" Width="150px" DataSourceID="queuesXML">
</dx:ASPxComboBox>
<asp:XmlDataSource ID="queuesXML" runat="server" DataFile="~/Config/Config.xml" XPath="queue/name" ></asp:XmlDataSource>
我知道我正在使用 dev express,但这不重要