hi all, can anyone please tell me how to add images which are in subdirectory of application directory to an image control.
i created an subdirectory called 'images' in application directoy, and my application directory exists in d:\raj\aspcoding\addphotox, and now i added an image contol to the form , and i want to add an image present int the 'images' directory which is present im my application directory.how can i do this?.

i tried by adding Image1.ImageUrl="Path of the image file in apllication directory", , but it is not working.

can any body help, iam an novice programmer in asp.net

are you sure you have permission to that directory from iis?

try moving the images to inetpub in your directory there

also if that doesn't work, use

Server.MapPath(imagePath);
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.