Click here to Skip to main content
15,921,548 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi I have the following code for fieldset but is not working
<fieldset>
    <legend>@Html.Label("Caller Information","Caller Information", new { @class = "normal-label" })</legend>
    <table class ="align-center">
        <tr>
            <td>@Html.Label("First Name: ", new { @class = "normal-label" })</td>
            <td>@Html.Label("Surname   : ", new { @class = "normal-label" })</td>
            <td>@Html.Label("Client    : ", new { @class = "normal-label" })</td>
            <td>@Html.Label("Contact No:", new { @class = "normal-label" })</td>
            <td>@Html.Label("Alternative No:", new { @class = "normal-label" })</td>

        </tr>
        <tr >
            <td>@Html.TextBoxFor(model => model.CallerFirstName, null, new {@class = "CallerFirstName" })</td>
            <td>@Html.TextBoxFor(model => model.CallerSurname, null, new {@class = "CallerSurname" })</td>
            <td>@Html.TextBoxFor(model => model.Client, null, new {@class = "Client" })</td>
            <td>@Html.TextBoxFor(model => model.Contact_Number, null, new {@class = "Contact_Number" })</td>
            <td>@Html.TextBoxFor(model => model.Alternative_Contact, null, new {@class = "Alternative_Contact" })</td>
        </tr>
    </table>
</fieldset>
Posted

1 solution

Try to place a simple text value instead of @Html.Label .....

example:

HTML
<fieldset>
       <legend>Product Details</legend>
       @Html.HiddenFor(model => model.DetailItem.ProductId)
       <div class="editor-label">
           @Html.LabelFor(model => model.DetailItem.Name)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.DetailItem.Name)
           @Html.ValidationMessageFor(model => model.DetailItem.Name)
       </div>
       <p>
           <input type="submit" value="Save" />
       </p>
   </fieldset>
 
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