0

I am developing an asp.net mvc 2 application and am using a Html.TextAreaFor to display a textarea where the user can enter a text which is then stored and sent if needed.

The view which displays this functionality is strongly typed (typeof(Message)). The message has a sender, reciver, subject and message body. The code in the view looks like this <% 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> <% } %>

when i open this page in the browser then the submit button is placed over the textarea and i cant get it to render right...anybody help?

1
  • that sounds more like html/css issue to me. do you have a link to the page? Commented Nov 9, 2010 at 12:50

1 Answer 1

1

It looks like this is some CSS problem. Have you tried removing the styles to see if it renders correctly?

Sign up to request clarification or add additional context in comments.

3 Comments

I am pretty new to web programming so I have some trouble with css but after my brother told me to put a <br /> underneath the tetxarea it renders fine now... I'll stick with that for a while because i want to have all ready in time and later i will try to get the css work... thanks for the fast reply
@Ivan: Tell your brother he should create an account on StackOverflow.
Just found out that if i write it like this it works fine without <br /> ` <div class="multi-line"> <%: Html.EditorFor(model => model.Message) %> <%: Html.ValidationMessageFor(model => model.Message) %> </div> ` keypart is class=multi-line

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.