Users Pricing

forum

Home Forums Default image not shown in ASP ImageField – MindStick

Default image not shown in ASP ImageField

Allen Scott 2374 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" />


1 Answers

Markdown for AI

A clean, structured version of this page for AI assistants and LLMs.

Open .md