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

assembly - What is the addressing mode for ld, add, and rjmp instructions? -

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

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