我试图在我的MVC5 HTML网格中使用Font Awesome,如下面的代码段所示。在执行下面的代码时,网格将正确呈现,但是@ Html.Raw()声明中的文本显示在网格的单元格中,而不是Font Awesome图标。我在视图的其他地方,网格外部使用了Font Awesome,并且图标正确呈现,因此我相信Font Awesome的安装和配置正确。
check_failed = True
while check_failed:
username = input("Enter username: ")
password = input("Enter password: ")
with open("myfile.txt") as username_finder:
for line in username_finder:
if (username + ": " + password) == line.strip():
print("Correct")
check_failed = False
break;
else:
print("Sorry, this username or password does not exist")
答案 0 :(得分:-2)
@ Html.Grid(Model).Columns(columns => { column.Add()。Sanitized(false).Encoded(false).SetWidth(15).RenderValueAs(o => CustomRendering(o)); })