2

Web グリッドの各エントリを編集するためのリンクを作成しようとしていますが、リンクをクリックする%20%20%20%20%20%20%20%20%20%20%20%20%20と、URL の末尾に " " が追加されます。なぜこれが起こっているのか分かりません。%20%20%20%20%20%20%20%20%20%20%20%20%20ブラウザのアドレスバーの「」を削除すると、リンクが機能します。

<div class="divGridHistory">
     @historyDataGrid.GetHtml("webGridStyle",
        rowStyle: "gridrow",
        alternatingRowStyle: "altgridrow",
        selectedRowStyle: "webGridSelectedRow",
        displayHeader: true,
        htmlAttributes: new { id = "dedDetailDataGrid" },
        columns: historyDataGrid.Columns(
            historyDataGrid.Column("ControlGroupId", "Control Group ID", style: "webGridGroupId"),
            historyDataGrid.Column("OrganizationId", "Organization ID", style: "webGridOrganizationId"),
            historyDataGrid.Column("AleIndicator", "ALE Indicator", style: "webGridAleIndicator"),
            historyDataGrid.Column("EffectiveDate","Effective Date", style: "webGridStartDate", format: item => @Utility.FormatShortDate(item.EffectiveDate)),
            historyDataGrid.Column("ChangeReason","Change Reason", style: "webGridChangeReason"),
            historyDataGrid.Column("Edit",format:@<text>@Html.ActionLink("Edit","EditOrganizationAle","AleCalculation",new{id = Model.OrganizationId},"")</text>)
            ))
</div>
4

2 に答える 2

7

パラメータをトリミングしてみてください。

new { id = Model.OrganizationId.Trim() }
于 2013-09-09T15:07:34.267 に答える