でお願いしますお知らせください。イベントハンドラでDropdownList.SelectedItem.Text = "Others"をチェックし、テキストボックスを表示または非表示にします。
更新パネルを使用して、全面ポストバックを回避します。
<asp:DropDownList ID="DropDownList1" runat="server"
onselectedindexchanged="DL1_SelectedIndexChanged" AutoPostBack="true">
<asp:ListItem></asp:ListItem>
<asp:ListItem>Others</asp:ListItem>
</asp:DropDownList>
<asp:TextBox ID="TextBox1" runat="server" Visible="false">
そして、分離コードで
Protected Sub DL1_SelectedIndexChanged(sender As Object, e As EventArgs)
If DropDownList1.SelectedItem.Text = "Others" Then
TextBox1.Visible = True
Else
TextBox1.Visible= False
End If
End Sub
完全なコードの例を教えていただけますか? – pelleg
コードを更新しました。 – PraveenVenu
私はコードを書いています。他の人の代わりに – pelleg