Click here to Skip to main content
15,892,768 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have created employee master page where employee image and other details are displayed in the list page.
If employee has not uploaded the image instead of Alternate Text i want Transparent image to be displayed. Can anyone help me with this?
Posted

Alternate text is used only for text not for image.

By default show an default image from code behind, if for particular user dose not have image.
store an image in some folder and bind it like this

byte[] imageBytes = File.ReadAllBytes(Server.MapPath("/images/no-pic.gif"));
 
Share this answer
 
What do you mean by Transparent Image?
 
Share this answer
 
I am using mozilla firefox browser and in aspx file i have mentioned GenerateEmptyAlternateText as true. if no image is there to display it will be empty.
But if user opens my application in some other browser the column will have broken images.
How to make it transparent?
 
Share this answer
 
Comments
RahulMGunjal 21-Feb-14 5:01am    
Why don't you display default/sample image as a place holder if employee has not uploaded an image.
Member 10395687 21-Feb-14 7:06am    
How to use placeholder? please help me as i am new to asp.net
Sergey Alexandrovich Kryukov 10-Mar-14 0:46am    
This is a question, not an answer. This is abuse.
—SA

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