Click here to Skip to main content
12,290,988 members (65,712 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C# ASP.NET MVC
<% 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 2-Sep-12 20:03pm
20119991.3K

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

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
  Permalink  

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160518.1 | Last Updated 3 Sep 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100