views:

21

answers:

2

Hi,

I'm a newbie to Asp.net,learning from the Apress's Begining Asp.net...book.While very curious to see an image given by me on the browser,I'm stuck at the very first step, please help.

Configuration : Win7(32-bit),VS2008 Pro/.net 3.5,Firefox as default browser.

Now,In created a simple website(not web app) in C#,added three images(.png,.jpg,.gif) to the App_Data folder(using the solutn. explorer of course).Then added the Image control from the toolbox & in the ImageUrl property, selected one of the images->presses f5 to start in debugging mode but every time the browser displays the alternate text given by me.

Whats the problem?

Thanks.

+3  A: 

Don't put the image in the App_Data folder. Put it anywhere else in the website as anything inside the App_data folder is not accessible via HTTP Requests.

Tim B James
thanks man I missed a very basic point.
ryanlancer
+1  A: 

App_Data is a protected directory.

Place your image somewhere else, suggestion : on root create the /images/ dir and place them there.

Aristos
thanks man I now created the folder and it works!!!
ryanlancer