如何以表格格式放置代码 [英] how to place the code in table format

查看:52
本文介绍了如何以表格格式放置代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<% using (Html.BeginForm()) { %>
    <%: Html.ValidationSummary(true) %>
    <fieldset>
        <legend>EMP</legend>

       <table>
        <div class="editor-label">
            <%: Html.LabelFor(model => model.FirstName) %>

       <%-- </div>--%>

        <%--<div class="editor-field">--%>
            <%: Html.EditorFor(model => model.FirstName) %>
            <%: Html.ValidationMessageFor(model => model.FirstName) %>
            </tr>
        </div>
      <br />

        <div class="editor-label">
            <%: Html.LabelFor(model => model.LastName) %>
      <%--  </div>--%>
        <%--<div class="editor-field">--%>
            <%: Html.EditorFor(model => model.LastName) %>
            <%: Html.ValidationMessageFor(model => model.LastName) %>
        </div>
      <br />
        <div class="editor-label">
            <%: Html.LabelFor(model => model.Phone) %>
       <%-- </div>--%>
        <%--<div class="editor-field">--%>
            <%: Html.EditorFor(model => model.Phone) %>
            <%: Html.ValidationMessageFor(model => model.Phone) %>
        </div>
      <br />

        <div class="editor-label">
            <%: Html.LabelFor(model => model.Email) %>
        <%--</div>--%>
        <%--<div class="editor-field">--%>
            <%: Html.EditorFor(model => model.Email) %>
            <%: Html.ValidationMessageFor(model => model.Email) %>
        </div>
     </table>

推荐答案

您好,

我无法理解您的问题,但是,我想您想做的就是这个.检查下面.在做任何事情之前,您都非常需要学习HTML.由于这是基本的html.这些语法,您可以轻松地搜索并获取.因此,也请查看您的Google艺术.
Hi there,

I can''t understand your question but, I think what you want to do is this. Check below. You seriously need to learn HTML prior doing anything. Since this is pretty much basic html. These syntax you can easily google and get to it. So check out your google-arts too.
@{
	using (Html.BeginForm())
	{
		Html.ValidationSummary(true);

	<fieldset>
		<legend>EMP</legend>
		<table>
			<tr>
				<td>
					<div class="editor-label">@Html.LabelFor(model => model.FirstName)</div>
				</td>
				<td>
					<div class="editor-field">
						@Html.EditorFor(model => model.FirstName)
						@Html.ValidationMessageFor(model => model.FirstName)
					</div>
				</td>
			</tr>
			<tr>
				<td>
					<div class="editor-label">@Html.LabelFor(model => model.LastName)</div>
				</td>
				<td>
					<div class="editor-field">
						@Html.EditorFor(model => model.LastName)
						@Html.ValidationMessageFor(model => model.LastName)
					</div>
				</td>
			</tr>
			<tr>
				<td>
					<div class="editor-label">@Html.LabelFor(model => model.Phone)</div>
				</td>
				<td>
					<div class="editor-field">
						@Html.EditorFor(model => model.Phone)
						@Html.ValidationMessageFor(model => model.Phone)
					</div>
				</td>
			</tr>
			<tr>
				<td>
					<div class="editor-label">@Html.LabelFor(model => model.Email)</div>
				</td>
				<td>
					<div class="editor-field">
            @Html.EditorFor(model => model.Email)
						@Html.ValidationMessageFor(model => model.Email)
					</div>
				</td>
			</tr>
		</table>
	</fieldset>
	}
}


希望对您有所帮助


Hope this helps, regards


这篇关于如何以表格格式放置代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆