c# - How to present year instead of date in Hyperlink control in webForms -
i need show year instade of date string in hyperlinkfield in asp.net webforms
<asp:hyperlinkfield headertext="economic year" datatextfield="date" sortexpression="date"datanavigateurlfields="id" datanavigateurlformatstring="p_profitlossadd.aspx?id={0}"></asp:hyperlinkfield>
but hyperlinkfield not take dataformatstring="{0:d} property of control .
<asp:hyperlinkfield headertext="economic year" datatextfield="date" datatextformatstring="{0:yyyy}" sortexpression="date"datanavigateurlfields="id" datanavigateurlformatstring="p_profitlossadd.aspx?id={0}"></asp:hyperlinkfield>
Comments
Post a Comment