Razor を使用するようにプロジェクトをアップグレードしようとしています。Telerik 変換ツールhttps://github.com/telerik/razor-converter を使用してビューを Razor に変換しましたが、Telerik ウィンドウ コントロールに関連するエラーが発生します。
ウィンドウ コントロールのマークアップの例を次に示します。
@Html.Telerik().Window()
.Name("ClientWindow")
.Content(@<text>
<div id="Div1">
<div class="bgTop">
<label for="drpFilter">
Filter:</label>
@Html.DropDownListFor(x => x.ClientLookupViewModel.SelectedFilter, Model.ClientLookupViewModel.FilterBy, new { id = "drpClientFilter" })
<label>
By:</label>
@Html.TextBoxFor(x => x.ClientLookupViewModel.FilterValue, new { id = "filterValue" })
<button type="button" value=" " class="t-icon t-refresh refreshButton" title="Refresh Client & Matter"
onclick="refreshClientClicked()">
</button>
@Html.ValidationMessageFor(x => x.ClientLookupViewModel.FilterValue)
</div>
<iframe id="frameClientLookup" src="@Url.Action("ClientIndex","Lookup")" style="border: 0px;
height: 404px; width: 100%; margin: 0px; padding: 0px;"></iframe>
<div class="bgBottom">
<input style="float: right; margin-top: 5px" type="button" value="OK" id="Button1" onclick="btnClientOkayClicked()" /></div>
</div>
</text>)
.Modal(true)
.Width(800)
.Height(473)
.Title("Client Lookup")
.Buttons(buttons => buttons.Refresh().Maximize().Close())
.Visible(false)
.HtmlAttributes(new { id = "ClientWindow" })
.Render();
これにより、次のエラーが発生します
パーサー エラーの説明: この要求を処理するために必要なリソースの解析中にエラーが発生しました。次の特定の解析エラーの詳細を確認し、ソース ファイルを適切に変更してください。
パーサー エラー メッセージ: "<" は、コード ブロックの先頭では無効です。識別子、キーワード、コメント、"(" および "{" のみが有効です。
ソース エラー:
Line 41: @Html.Telerik().Window()
Line 42: .Name("ClientWindow")
Line 43: .Content(@<text>
Line 44:
Line 45: <div id="Div1">
-----------------------
ここで何が問題なのか誰か知っていますか?
ありがとう