I have a MVC3 HtmlHelper extension like this:
public static MvcHtmlString ShowInfoBar(this HtmlHelper helper, string message, InfoMessageType messageType)
I have tried as below, and its working.
string.Format(@"ExecuteOrDelayUntilScriptLoaded(function () {{ Your function.