Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#ASP.NETMVC
<% 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.1K

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
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 437
1 sanket saxena 355
2 thatraja 240
3 Abhinav S 216
4 CPallini 215
0 Sergey Alexandrovich Kryukov 8,784
1 OriginalGriff 5,025
2 Peter Leow 3,839
3 Maciej Los 3,535
4 Er. Puneet Goel 3,107


Advertise | Privacy | Mobile
Web01 | 2.8.140415.2 | Last Updated 3 Sep 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid