c# - Default value for Html dropdown list -



c# - Default value for Html dropdown list -

i using mvc4 , c#. have dropdownlist set using viewbag.

@html.dropdownlist("category_parent", new selectlist(viewbag.category, "id", "name"), new { @class = "form-control" })

by default selects first value want select null value (a default value). how can this?

c# asp.net-mvc-4

Comments

Popular posts from this blog

c - Compilation of a code: unkown type name string -

ubuntu - Bash Script to Check That Files Are Being Created -

Php operator `break` doesn't stop while -