开发者

mvc3 load dynamic properties into javascript using razor view engine

开发者 https://www.devze.com 2023-03-05 17:40 出处:网络
<script type=\"text/javascript\" charset=\"utf-8\"> var plug = new $.myPlugin({ icon: \"@ConfigurationManager.ApplicationIcon\"
<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()" });
0

精彩评论

暂无评论...
验证码 换一张
取 消