我正在开发一个asp.net mvc 2应用程序,并使用Html.TextAreaFor来显示一个textarea,用户可以在其中输入一个文本,然后根据需要存储和发送该文本。Html.TextAreaFor在asp.net mvc 2渲染错误!
显示此功能的视图是强类型的(typeof(Message))。该消息具有发送者,接收者,主题和消息主体。在视图中的代码看起来像这样 <% using (Html.BeginForm()) {%> <%: Html.ValidationSummary(true) %> <fieldset style="height:100%"> <legend>E-mail</legend> <div class="editor-label"> <%: Html.LabelFor(model => model.To) %> </div> <div class="editor-field"> <%: Html.TextBoxFor(model => model.To) %> <%: Html.ValidationMessageFor(model => model.To) %> </div> <div class="editor-label"> <%: Html.LabelFor(model => model.From) %> </div> <div class="editor-field"> <%: Html.TextBoxFor(model => model.From) %> <%: Html.ValidationMessageFor(model => model.From) %> </div> <div class="editor-label"> <%: Html.LabelFor(model => model.Subject) %> </div> <div class="editor-field"> <%: Html.TextBoxFor(model => model.Subject) %> <%: Html.ValidationMessageFor(model => model.Subject) %> </div> <div class="editor-label"> <%: Html.LabelFor(model => model.Message) %> </div> <div class="editor-field"> <%: Html.TextAreaFor(model => model.Message) %> <%: Html.ValidationMessageFor(model => model.Message) %> </div> <p> <input type="submit" value="SaveMail" /> </p> </fieldset> <% } %>
当我在浏览器中打开此页面,然后提交按钮放置在textarea上,我不能让它呈现正确的...任何人的帮助?
听起来更像我的HTML/CSS问题。你有链接到页面? – 2010-11-09 12:50:10