Reputation: 796
How do I modify the following code to break the Title string value into two lines? The center align doesn't seem to work either. Am I missing something?
@{
Html.RenderAction(
"GenericPopupPartial",
"Shared",
new {
containerName = "registerSuccess",
BodyHtml = Model.MessageSent,
Title = "Thank you for registering! Our representatives will review your request and email you with access to our product section shortly."
}
);
}
<a class="fbox1" id="registerSuccess-link" href="#registerSuccess" style="display: none; text-align:center;"></a>
Output as follows:
Thanks for registering! Our representatives will review your request and email you with access to our product section shortly.
Upvotes: 0
Views: 239
Reputation: 28563
try
@Html.Raw(Html.Encode(Model.MultiLineText)
and include the \n character between the lines
the following will replace the 'break' character with a new line. Maybe try that.
@Html.Raw(Html.Encode(Model.MultiLineText).Replace("\n", "<br />")){"GenericPopupPartial",
"Shared",
new {
containerName = "registerSuccess",
BodyHtml = Model.MessageSent,
Title = "Thank you for registering! <br /> Our representatives will review your request and email you with access to our product section shortly."
}
);
}
Upvotes: 1
Reputation: 35950
Try \n
:
Title = "Thank you for registering!\nOur representatives will review your request and email you with access to our product section shortly."
Upvotes: 1