mvc 设置select项选中

                        <select id="FloorType" name="FloorType">
                            @{
                                var check = "";
                            }
                            @if (floorItem != null)
                            {
                                foreach (var item in floorItem)
                                {
                                    if (item.SysNo.ToString().Equals(Model.FloorType))
                                    {
                                        check = "selected=‘selected‘";
                                    }
                                    else
                                    {
                                        check = "";
                                    }
                                <option @check value="@item.SysNo">@item.FloorTypeName</option>
                                }
                            }
                        </select>

 

mvc 设置select项选中

上一篇:netty之bytebuf粘包、分包


下一篇:Detergent-Free Simultaneous Sample Preparation Method for Proteomics and Metabolomics (一种无变性剂的同时制备蛋白质组和代谢组样品的方法)