[英]Razor.Parse error during parsing googlemap link
腳本
在我的應用程序中,我使用Razor.Parse<>().
解析文本,鏈接和HTML
標記Razor.Parse<>().
string Razor.Parse<TEmail>(string razorTemplate, TEmail model) where TEmail : BaseEmail
我使用'@'
來解析來自model
數據。 我還解析Web鏈接。 直到我解析了Google Map
鏈接,該功能才能正常工作
問題 https://www.google.com/maps/place/New+York,+NY,+USA/@40.6974034,-74.1197634,11z/data=!3m1!4b1!4m5!3m4!1s0x89c24fa5d33f083b:0xc80b8f06e177fe62!8m2! 3d40.7127753!4d-74.0059728鏈接包含' @ '。 所以我得到錯誤:
RazorEngine.Templating.TemplateParsingException: '"40.6974034" is not valid at the start of a code block. Only identifiers, keywords, comments, "(" and "{" are valid.'
我的嘗試
我嘗試用dobule @@ https://www.google.com/maps/place/New+York,+NY,+USA/@@40.6974034,-74.1197634,11z/data=!3m1!4b1!4m5解析html !3m4!1s0x89c24fa5d33f083b:0xc80b8f06e177fe62!8m2!3d40.7127753!4d-74.0059728但我收到錯誤消息:
RazorEngine.Templating.TemplateParsingException: '"@" is not valid at the start of a code block. Only identifiers, keywords, comments, "(" and "{" are valid.'
知道該怎么辦嗎? 謝謝
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.