Live Chat Icon For mobile
Live Chat Icon

How to disable a Dropdownlist once someone has selected an item in the Dropdownlist

Platform: ASP.NET| Category: Client Side Scripting

<asp:DropDownList id='DropDownList1' runat='server'>
	<asp:ListItem Value='Red'>Red</asp:ListItem>
	<asp:ListItem Value='Blue'>Blue</asp:ListItem>
	<asp:ListItem Value='Green'>Green</asp:ListItem>


DropDownList1.Attributes.Add('onChange','this.disabled=true;' )


DropDownList1.Attributes.Add('onChange','this.disabled=true;' );

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.