これに対する解決策はありますか?
これは機能していません
$("#spanfile").html(@Html.ResourceScriptString("error","please.choose.file"));
どこ
public static string ResourceScriptString(this HtmlHelper html, string type, string key)
{
return HttpUtility.JavaScriptStringEncode(ResourceDBManager.CachedObject.getValue(type, key), true);
}
私はそれをうまく書きたいのですが、これは機能していますが、VSでJavaScriptの解析エラーが発生しています
$("#spanfile").html("@Html.ResourceScriptString("error","please.choose.file")");
どこ
public static string ResourceScriptString(this HtmlHelper html, string type, string key)
{
return HttpUtility.JavaScriptStringEncode(ResourceDBManager.CachedObject.getValue(type, key), false);
}