Hi All,
I have added an Image control in aspx file and on runtime its ImageUrl property getting decided.
Ex:
string imageName = Label1.text;
Image1.ImageUrl = @"C:\folder\" + imageName + ".jpg";
But on running the page, image is not getting displayed.
I have checked the Image1.ImageUrl value during runtime is correct.
Any suggestions?
Thanks
Loading

Suthish NairRank #92 · 22.8K reputationPosted Feb 12, 2011, 8:42 AM EST
Contains application data files including .mdf database files, XML files, and other data store files.
The App_Data folder is used by ASP.NET to store an application's local database, such as the database for maintaining membership and role information.
So you cant' store other files in App_Folder.
Create an image folder outside App_Folder, store images in it.
Suthish NairRank #92 · 22.8K reputationPosted Feb 12, 2011, 8:34 AM EST
night sailor20 reputationPosted Feb 12, 2011, 8:36 AM EST
night sailor20 reputationPosted Feb 12, 2011, 8:59 AM EST
i am doing like this :
string image = Label1.Text;
Image1.ImageUrl = @"~/App_Data/image/" + image + ".jpg";
Suthish NairRank #92 · 22.8K reputationPosted Feb 12, 2011, 9:14 AM EST
refer attachment..
night sailor20 reputationPosted Feb 12, 2011, 9:20 AM EST
Thanks.