Click here to Skip to main content
15,892,746 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
XML
<% 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>
Posted

1 solution

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
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900