I have a MVC3 HtmlHelper extension like this:
public static MvcHtmlString ShowInfoBar(this HtmlHelper helper, string message, InfoMessageType messageType)
{
return MvcHtmlString.Create(String.Format(@"<script type=""text/javascript"">$(document).ready(function () { gtg.core.showInfoBar('{0}', '{1}'}; );</script>", message, messageType.ToString().ToLower()));
}
The value of message
is "The product "Product Name" was saved successfully."
The value of messageType
is info
.
It keeps saying Input string was not in the correct format.
I am stuck??