---
title: "How to create dropdownlist Disabled in ASP.NET Razor MVC"  
description: "How to create dropdownlist Disabled in ASP.NET Razor MVC"  
author: "Anonymous User"  
published: 2014-11-27  
updated: 2014-11-27  
canonical: https://www.mindstick.com/forum/12706/how-to-create-dropdownlist-disabled-in-asp-dot-net-razor-mvc  
category: "asp.net mvc"  
tags: ["asp.net mvc", "dropdown"]  
reading_time: 1 minute  

---

# How to create dropdownlist Disabled in ASP.NET Razor MVC

```
<div class="form-group">                   
@Html.LabelFor(model => model.CourseStatus, new { @class ="control-label col-md-2" })            <divclass="col-md-10">           
@Html.DropDownList("statusList", String.Empty, new { @disbled= disabled})           
@Html.ValidationMessageFor(model => model.CourseStatus)               </div>    </div>
```

I am new in [ASP.NET MVC](https://www.mindstick.com/forum/155798/what-is-caching-in-asp-dot-net-mvc) and RAZOR. I just want to create a disabled dropdownlist. I have [already](https://yourviews.mindstick.com/view/88453/the-hidden-ways-ai-is-already-controlling-your-daily-life) created SelectList [name](https://yourviews.mindstick.com/view/87450/how-to-generate-a-brand-name-using-linkedin-comprehensive-guide) "statusList". Through which I [am trying](https://answers.mindstick.com/qa/36834/which-two-programming-languages-should-i-master-in-if-i-am-trying-to-get-into-google-or-facebook) to call the status. but I want to make it disbled and make one [status as](https://answers.mindstick.com/qa/38117/name-the-variety-of-rice-a-speciality-from-burdwan-district-of-west-bengal-which-has-got-the-geographical-indication-gi-status-as-a-result-rice-from-other-regions-or-rice-of-other-varieties-cannot-be-branded-as-it-s-name) by [default](https://www.mindstick.com/interview/12771/what-is-the-importance-of-default-resources)

## Replies

### Reply by Pravesh Singh

Hi Jeet,

You need to use like this.For an Empty drop down list with out any value you should use.

```
@Html.DropDownList("statusList", new List<SelectListItem> { }, String.Empty, new { disabled = "disabled" })
```

and if you want to populate values as well you can use like this.

```
@{  List<SelectListItem> list = new List<SelectListItem>();  list.Add(new SelectListItem {  Value="1", Text="Test Status"});}@Html.DropDownList("statusList", list , String.Empty, new { disabled = "disabled" })
```


---

Original Source: https://www.mindstick.com/forum/12706/how-to-create-dropdownlist-disabled-in-asp-dot-net-razor-mvc

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
