forum

home / developersection / forums / default image not shown in asp imagefield

Default image not shown in ASP ImageField

Allen Scott 2025 29-Jan-2015

In my asp.net gridview there's an ASP ImageField,When image is not shown or broken I need to show the Default Image, here I use NullImageUrl for this but this won't work.

My Code:

<asp:ImageField DataImageUrlField="FilePath" ControlStyle-Height="50" ControlStyle-Width="50" HeaderText="Image Preview" NullImageUrl="~/images/Defaultimg.png" />


Updated on 29-Jan-2015
Can you answer this question?

Answer

1 Answers

Liked By