I’m trying to add column to ASPxGridView which would have link to other page:
<Columns>
...
<dxwgv:GridViewDataColumn Caption=" " VisibleIndex="10">
<DataItemTemplate>
<dxe:ASPxHyperLink ID="lnkEdit" runat="server" Text="Edit" NavigateUrl="../Category/Elements/<%# Eval("Id").ToString() %>/Edit"/>
</DataItemTemplate>
</dxwgv:GridViewDataColumn>
</Columns>
But I get error:
Parser Error Message: The server tag is not well formed.
when I used ‘ ‘ instead ” ” the link href property is “../Category/Elements/<%# Eval(“Id”).ToString() %>/Edit”
I don’t think you can put databinding elements into the middle of the attribute value. The entire value needs to be within the
<% %>:I’m not sure with UI library you’re using, but usually the
Eval()allows a string format parameter. This would be preferable to the string concatenation approach. You might be able to do: