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

Popular posts from this blog

Load Balancing in Bluemix using custom domain and DNS SRV records -

oracle - pls-00402 alias required in select list of cursor to avoid duplicate column names -

python - Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] error -