Click here to Skip to main content
15,887,262 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i did a page where it shows data from sql database, where it is shown in a gridview. i can now then choose the id to be print or to show image in another tab.

my problem is the image data type in column. at it shows no preview icon.

the easy way is to set "nulldisplay" with a value "no image" if no image is attach

http://i1228.photobucket.com/albums/ee443/jaylisto/question%20config_zpsuytusnba.jpg[^]

else show a small picture like an icon or just show " with attachment" text if image exist.

thats my problem, where no settings is available for "notnulldisplay" = " with image"

take a look at this example.
http://i1228.photobucket.com/albums/ee443/jaylisto/question_zpsmujru6af.jpg[^]

no code is necessary to show, clicking the gridview setting and configure the connection to the sql database.

additional info:
I'm using visual studio 2010, asp.net with c#,
the image is uploaded directly in the sql database as an image file.
Posted
Updated 8-May-15 21:53pm
v2

1 solution

This option is available with ImageField. Property is NullImageURL.

Refer - Re: how to set default image in asp.net[^]
 
Share this answer
 
Comments
jaylisto 9-May-15 11:25am    
you did not understand my question.....
Okay explain me here.
jaylisto 9-May-15 23:56pm    
i did not put any imagefield with in the form. the blank image as you see in the picture is with in the gridview from sql database. the configuration is with in the gridview. if im the one who did not understand the answer please reply here, how ever i did look for an imagefield property in the grid view but theres nothing. thanks.
Hey the process you are following is called Smart Tag. But after you did so, it generates the markup for you on aspx page.

There is a ImageField. See the first image link you have given. Check the "Available Fields" section. The ImageField is there.

If you want to know more, then read - ImageField Class.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900