0

剣道グリッドのクライアントテンプレートの条件とともにhtml.actionlinkを追加しようとしました。誰でも正しい構文を助けてください。おかげさまで Html.Actionlink(...)@「...テンプレート... 」+ ToHtmlString:クライアントテンプレートで正しい構文を使用して条件文と一緒にActionlinkを追加する

そして、その後、アクションリンク最終テンプレート構文あなたが引用符で囲まれたテンプレート構文を持っている必要があり
col.Bound(o => o.IsEmpolymentFileExist).ClientTemplate("# if(IsEmpolymentFileExist == true) { # @Html.ActionLink("OpenFile", "Openfile", "PreEmploymentWorkflow", new { Id = "#=PreEmploymentId#", uploadfilename = "Employment Application" }, new { @class = "classname3" }).ToHtmlString() # } else {# <img ... /> # } #") 

答えて

0

。 ()+ " ...テンプレート..."、そうはしてみてください:{# <img ... /> # }は内部のいずれかハッシュする必要があります

.ClientTemplate("# if(IsEmpolymentFileExist == true) { #" + @Html.ActionLink("OpenFile", "Openfile", "PreEmploymentWorkflow", new { Id = "#=PreEmploymentId#", uploadfilename = "Employment Application" }, new { @class = "classname3" }).ToHtmlString() + "# } else {# <img ... /> # } #") 

わかりません。

関連する問題