Click here to Skip to main content
15,917,005 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am displaying an image based on some conditions,but i am unable to display the image

C#
   string path = "E:/ software/Datadog/DataDog/bin/Release/Images/ViewDiagnosisFault_severity scale00.png"; 
string[] _strFaultDetails = new string[]
                                {
                                     "     No Faults Found  ",         
                                    " None ",
                                     " 0/100 ",path
                                
                                };
Posted
Updated 9-Jul-14 3:26am
v2
Comments
CHill60 9-Jul-14 9:25am    
Where is the code to display the image?
chandra sekhar 9-Jul-14 9:38am    
iTextSharp.text.Image[] this is my image
CHill60 9-Jul-14 9:42am    
See solutions below.

Remove space between / and software
"E:/software/Datadog/DataDog/bin/Release/Images/ViewDiagnosisFault_severity scale00.png"; 
 
Share this answer
 
That code doesn't display images. All it does is create a string which should point at the image, and add it to an array of other strings.

But...if you are using that path string to access the image file later, then try removing the space:
C#
string path = "E:/ software/Datadog/DataDog/bin/Release/Images/ViewDiagnosisFault_severity scale00.png";

Becomes
C#
string path = "E:/software/Datadog/DataDog/bin/Release/Images/ViewDiagnosisFault_severity scale00.png";
As it is unlikely that the folder name starts with a space - and C# does care about spaces...

[edit]Typos - OriginalGriff[/edit]
 
Share this answer
 
v2
Comments
chandra sekhar 9-Jul-14 9:46am    
This is my image iTextSharp.text.Image[] so how can i display the image in that path?

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