未在asp.net mvc中设置RadioButton的值

时间:2012-09-05 11:17:22

标签: asp.net-mvc

我使用带有ViewEngine Razor的asp.net mvc并在页面的html中编写Radiobuttons:

<form id="ProductForm" method="post" action="@Url.Action("..", "..", new { area = "..." })">
<fieldset>
<div style="float: left; width: 550px; margin-top: 5px;">
                    <div class="editor-label">
                        <label for="DescriptionId">FullDescription</label>
                    </div>
                    <div class="editor-field">
                        <div style=" border: 1px solid Gray;">
                            <input type="hidden" name="DescriptionId" id="DescriptionId"/>
                            <div>
                                <input type="radio" name="radioDescription" id="radioDescriptionNew" value="New" checked="checked" />New
                                <input type="radio" name="radioDescription" id="radioDescriptionExist" value="Exist" />Exist
                                <span id="DescriptionChooseHref" style=" visibility: hidden;">(<a href="#">Select</a>)</span>
                            </div>
                            <div>
                                <textarea id="DescriptionText" style=" width: 530px; height: 200px; margin: 5px 0 5px 5px" placeholder="Full Description"></textarea>
                            </div>
                        </div>
                    </div>
                </div>
...
</fieldset>
</form>

但是当我运行我的网站时,我会在HTML中看到:

<input type="radio" name="radioDescription" value checked="checked" />
<input type="radio" name="radioDescription" value />

我做错了什么?感谢的。

0 个答案:

没有答案