Asp.net mvc 在文本区域中对齐数据库中的数据
我在文本区域中显示一些数据库数据,但我想像在邮箱中一样对齐这些数据。如何对齐文本区域数据?请帮帮我 我的源代码如下:Asp.net mvc 在文本区域中对齐数据库中的数据,asp.net-mvc,Asp.net Mvc,我在文本区域中显示一些数据库数据,但我想像在邮箱中一样对齐这些数据。如何对齐文本区域数据?请帮帮我 我的源代码如下: <h3>Feedback Mail</h3> TO <%:Html.DropDownList("to", ViewData["EmailID"] as SelectList)%> <% using (Html.BeginForm("SendMail", "Process", FormMethod.Post))
<h3>Feedback Mail</h3>
TO
<%:Html.DropDownList("to", ViewData["EmailID"] as SelectList)%>
<% using (Html.BeginForm("SendMail", "Process", FormMethod.Post))
{%>
<table border="0">
![enter image description here][1]<tr><td> Cc</td>
<td style="width: 470px"> <input type ="text" name="cc" id="Cc" style="width: 470px" /><br /></td></tr>
<tr> <td> BCc</td>
<td style="width: 470px"> <input type ="text" name="bcc" id="BCc" style="width: 470px"/><br /></td></tr>
<tr> <td> Subject</td>
<td style="width: 470px"> <input type ="text" name="subject" id="Subject"style="width: 470px" /><br /></td></tr>
<tr><td> Body</td></tr>
</table>
<textarea rows="15" cols="30" id="body" name="body" style="width: 548px" >
Qualification: <%:Model.Candidate.Qualification %>
Total Experience:<%:Model.Candidate.Experience %>
Company:<%:Model.Candidate.Company.CompanyName %>
Current CTC:<%:Model.Candidate.CurrentCTC %>
Expected CTC:<%:Model.Candidate.ExpectedCTC %>
Notice Period:<%:Model.Candidate.NoticePeriod %>
<%:Model.Recruiter.Signature %>
</textarea>
<%-- <TextArea name="value" id="body" TextMode="MultiLine" Columns="55" Rows="10"/><br /></td></tr>--%>
<input type ="submit" name="Sendmail" id="Send" value="Send"/>
您可以尝试以下代码:
<textarea rows="15" cols="30" id="body" name="body" style="width: 548px; text-align:left;" />
我使用CSS对齐我的文本区域。而且效果很好 在视图中,可以调用css文件
<link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
textarea#body
{
width: 750px;
height: 300px;
text-align: left;
}