PagodNaUtak
asked on
Setting the default image.
Hi,
Is the below code works?
Is there a better approach?
Your idea is greatly appreciated.
Is the below code works?
Is there a better approach?
Your idea is greatly appreciated.
<img src="<%# if(String.IsNullOrEmpty(DataBinder.Eval(Container.DataItem, "ImageURL")),"/_layouts/images/blank.gif", DataBinder.Eval(Container.DataItem, "ImageURL") ) %>" title="<%# DataBinder.Eval(Container.DataItem, "ImageAltText") %>" alt="<%# DataBinder.Eval(Container.DataItem, "ImageAltText") %>" />
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.