---
title: "SelectedValue of DropDownList is not the one I selected when Enabled=false"  
description: "SelectedValue of DropDownList is not the one I selected when Enabled=false"  
author: "Mark Devid"  
published: 2014-08-27  
updated: 2014-08-27  
canonical: https://www.mindstick.com/forum/2173/selectedvalue-of-dropdownlist-is-not-the-one-i-selected-when-enabled-false  
category: "asp.net"  
tags: ["asp.net", ".net", "c#", "disabled the SelectedValue of the DropDownList", "SelectedValue of DropDownList"]  
reading_time: 1 minute  

---

# SelectedValue of DropDownList is not the one I selected when Enabled=false

I have a few DropDownLists on a webform each pointing to a SqlDataSource. Some of these datasources use one of these DropDownLists for a [select](https://www.mindstick.com/forum/160534/orderby-then-select-vs-select-then-orderby-performance) [parameter](https://www.mindstick.com/blog/450/parameter-class-in-c-sharp), [filtering](https://www.mindstick.com/forum/33958/how-to-filtering-with-the-entity-framework-is-an-asp-dot-net-mvc-application) the list to specific categories.

For certain users two of these DropDownLists are to be automatically set and disabled.

When I submit the form with the drop downs enabled it works fine but when they are disabled the SelectedValue of the [DropDownList](https://www.mindstick.com/articles/324837/how-to-bind-dropdownlist-in-mvc-core-from-database-using-entity-framework) is being reset to the first one in the list.

<asp:DropDownList ID="ddlManager" runat="[server](https://www.mindstick.com/articles/43769/what-is-serverless-architecture-is-it-worth-switching-over)" DataSourceID="dsManagers"

[EnableViewState](https://www.mindstick.com/interview/734/what-does-the-enableviewstate-property-signify)="false" [DataValueField](https://www.mindstick.com/forum/12846/dropdownlist-datavaluefield-in-asp-dot-net-c-sharp)="ManagerID" DataTextField="MgrName"

AppendDataBoundItems="false" ondatabound="ddlManager_DataBound" >

The [drop down](https://www.mindstick.com/forum/263/drop-down-list-problem) lists add an extra item on the data bound event as follows:

protected void ddlManager_DataBound(object sender, EventArgs e)

{

this.ddlManager.Items.Insert(0, new [ListItem](https://www.mindstick.com/forum/23267/insert-a-listitem-to-a-dropdownlist)("--[Manager](https://www.mindstick.com/articles/13000/perks-of-implementing-a-quotation-manager)--", "--Manager--"));

}

## Replies

### Reply by Sumit Kesarwani

Hi Mark,

You can read/write to a List<> or Dictionary<>; and assign the list to your DropDownList datasource whenever the DropDownList box gets enabled.


---

Original Source: https://www.mindstick.com/forum/2173/selectedvalue-of-dropdownlist-is-not-the-one-i-selected-when-enabled-false

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
