How can I customize the text that is rendered with the LabelFor() method?
I have a bool field called IsMarried in my model, it currently renders IsMarried on the View. How can I have it say something like: "Married".
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<TeacherEvaluation.Models.GuestBookEntry>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
GuestBook Index
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<h2>Guest Book</h2>
<p>Please sign the Guest Book!</p>
<% using (Html.BeginForm()) { %>
<fieldset>
<legend>Guest Book</legend>
<%: Html.LabelFor(model => model.Name) %>
<%: Html.TextBoxFor(model => model.Name) %>
<%: Html.LabelFor(model => model.Email) %>
<%: Html.TextBoxFor(model => model.Email) %>
<%: Html.LabelFor(model => model.Comment) %>
<%: Html.TextAreaFor(model => model.Comment, new { rows = 6, cols = 30 })%>
<%: Html.LabelFor(model => model.IsMale) %>
<%: Html.CheckBoxFor(model => model.IsMale) %>
<div>
<input type="submit" value="Sign" />
</div>
</fieldset>
<% } %>
</asp:Content>
Thanks!