Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In the code below:::

C#
byte[] image = fetchData.GetEmployeeImage(employeeNo);
string physicalPath;
FileStream file = File.Create(Environment.ExpandEnvironmentVariables("%temp%") + "\\" + employeeNo + ".jpg");
file.Write(image, 0, image.Length);
physicalPath = Environment.ExpandEnvironmentVariables("%temp%") + "\\" + employeeNo + ".jpg";
imgProfilePic.ImageUrl = physicalPath.ToString();
file.Close();


aspx page:
ASP.NET
<asp:ImageMap ID="imgProfilePic" runat="server">



i am importing the image file from fetchData class and attempting show the image in image map control by at first storing image in temp folder and displaying it... here, physical path variable returns the image that i wanted but imgProfilePic control doesnot display the image... I have alredy tried with image control bt image is not displayed... any help??? Is there alternative control thah can be used..
Posted
Updated 17-Jan-14 21:58pm
v2
Comments
Put a debugger in code and check if the value of "physicalPath" is coming correct or not?
Tejas Vaishnav 18-Jan-14 6:00am    
try to add relative URL instead of physical path and check it out, image is displayed or not..
relative path means -> ~/temp/111.jpg
physical path means -> C:\temp\111.jpg
Codes DeCodes 20-Jan-14 1:03am    
thanks for the suggestion man..

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