Using Inline C# inside Javascript File in MVC Framework

后端 未结 9 1714
野性不改
野性不改 2020-12-31 07:39

I am trying to get inline C# to work in my JavaScript files using the MVC Framework. I made this little test code up.

$(document).ready(function() {
    ale         


        
9条回答
  •  醉梦人生
    2020-12-31 08:22

    Your web server does not process .js files, it only serves them to the client. This is in contrast to .aspx or other ASP.NET file types. These files are interpreted by your server before they are served up to the client.

提交回复
热议问题