Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

how to send boolean with newselectList from cshtml in form C#

You can try something like here:

<%= Html.DropDownList(
    "", 
    new SelectList(
        new[] 
        { 
            new { Value = "true", Text = "Yes" },
            new { Value = "false", Text = "No" },
        }, 
        "Value", 
        "Text",
        Model
    )
) %>
 
PREVIOUS NEXT
Tagged: #send #boolean #newselectList #cshtml #form
ADD COMMENT
Topic
Name
1+7 =