1

これは私の開発マシンで発生しており、同じコードベースが本番環境で動作しています。したがって、これは IIS/フレームワークの問題だと思います。すべてのページに影響します。

両方のサーバーで、Page_Validators が正しく設定されています。

<script type="text/javascript">
<!--
var Page_Validators =  new Array(document.getElementById("ValidatorInsurancePayerRequired"),
document.getElementById("ValidatorCheckPostDateRequired"),
document.getElementById("ValidatorCheckPostDateFormat"),
document.getElementById("ValidatorCheckNumberRequired"),
document.getElementById("ValidatorCheckTotalRequired"),
document.getElementById("ValidatorCheckTotalFormat"));
// -->
</script>

ただし、私の開発マシンでは、検証プロパティを設定するスクリプト ブロックがレンダリングされません。

<script type="text/javascript">
<!--
var ValidatorInsurancePayerRequired = document.all ? document.all["ValidatorInsurancePayerRequired"] : document.getElementById("ValidatorInsurancePayerRequired");
ValidatorInsurancePayerRequired.controltovalidate = "txtPayer";
ValidatorInsurancePayerRequired.errormessage = "<br>Insurance Payer Is Required";
ValidatorInsurancePayerRequired.display = "Dynamic";
ValidatorInsurancePayerRequired.evaluationfunction = "RequiredFieldValidatorEvaluateIsValid";
ValidatorInsurancePayerRequired.initialvalue = "";
.
. all other Page Validators
.
// -->
</script>

aspnet_regiis -c を実行して、検証スクリプトを再インストールしようとしました。-e (削除) に続いて -i (インストール) を試してみましたが失敗しました。

何か案は?

4

1 に答える 1

2

実行している .NET/IIS のバージョンは何ですか? これが 2.0 の実装である場合は、これを web.config の system.web セクションに入れてみて、何が起こるかを確認してください。

<xhtmlConformance mode="Legacy"/>

これは、ASP.Net 開発サーバーを使用して実行した場合に発生しますか?

また、開発でトレースが有効になっている場合は、無効にしてみてください。

これらのいくつかの提案を除いて、さらに支援するには、環境に関するより多くの情報が必要です.

于 2011-07-22T12:33:40.350 に答える