Default Picture

H

hoz

Hi ,
lets say i have an sql table Users ( id, name ,pictureurl)
i use datagrid to show records . my problem is , when pictureurl is null how
can i load default.jpg picture ? binding is done on run time ( using
DataEval.DataBinder)
 
G

Guest

Why not try altering your SQL Statement to use this syntax:

SELECT id, name, ISNULL(pictureurl, 'Default.jpg') as PictureURL
FROM Users

This will replace any null values in field "pictureurl" with "default.jpg"
 
A

andy lim

hi,

try this:

<img
src='<%#iif(container.dataitem("image")="","images/no_img.gif",container.dat
aitem("image")) %>'>

hope this helps,
andy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top