mvc3 load dynamic properties into javascript using razor view engine
<script type="text/javascript" charset="utf-8">
var plug = new $.myPlugin({
icon: "@ConfigurationManager.ApplicationIcon"
});
</script>
开发者_开发百科ConfigurationManager.ApplicationIcon - this method is returning a a path (string) this is firing a compilation error - can you please help?
Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: CS1502: The best overloaded method match for 'System.Web.WebPages.WebPageExecutingBase.Write(System.Web.WebPages.HelperResult)' has some invalid arguments
missing () - sry guys - im still new to mvc 3
var plug = new $.myPlugin({ icon: "@ConfigurationManager.ApplicationIcon()" });
精彩评论