在cshtml文件中添加注释时出现问题 [英] Problem in adding Comments in cshtml files

查看:1295
本文介绍了在cshtml文件中添加注释时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我在cshtml文件中添加注释,在Ajax函数中调用它时它将被视为一个新行。

If I add comments in cshtml files, it is taken as a new line when it is called in Ajax function.

推荐答案

你应该能够使用常规的HTML注释(例如<! - 在这里输入注释 - >)

You should be able to use the regular HTML comments (e.g. <!-- enter comments here -->)

这个cautml文件基本上被视为常规的html文件,它不应该有不同的注释结构。也许你可以在AJAX中处理它们时逃避这些评论?只是一个想法!

Becaues cshtml files are essentially treated like regular html files, it shouldn't have different commenting structures. Perhaps you could escape these comments when dealing with them in AJAX? Just a thought!


这篇关于在cshtml文件中添加注释时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆