asp.net - how to check grid view data row have value and if have value then formate with date time -


i have grid view. shows records product table contains here want using combine logic :

<asp:label id="label3" runat="server" text='<%#(string.isnullorempty((databinder.eval(container.dataitem, "releasedate", "{0:dd / mm / yyyy}")) ? " - " : eval("releasedate", "{0}"))%>'></asp:label> 

this logic not works , not putting - if data row have no value.

please me...

you forget + sigh add both of them

made edit see if work

runat="server" text='<%#(string.isnullorempty(databinder.eval(container.dataitem, "releasedate", "{0:dd / mm / yyyy}")) ? " - " : eval("releasedate", "{0}"))%>'></asp:label> 

Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -