tags:

views:

128

answers:

3

hi evaryone

I'm having an image that i have added to the image folder in app_data folder of my application. now problem is that it's showing the image at design time but at runtime it don't show.now if page is postback now it shows the image.

what's the prob with this.?

A: 

You should verify in the html code pre-postback that the image has a valid url. Aren't you setting the url only on the postback event handler?

Post the code for more help

Davide Vosti
<asp:Image ID="Image1" runat="server" ImageUrl="~/image/loginpic.jpeg" Height="227px" Width="362px" />
Aarsh Thakur
the browser will look in the image folder.... move your image in that directory and will work
Davide Vosti
thanx sir....nowits running by putting that image outside the folder.thanx a lot.
Aarsh Thakur
sir can you please see the another problem that is problem with login control that i posted yesterday.please look at ttah..
Aarsh Thakur
A: 

You shouldn't put images in the App_Data folder- it is meant for storing data that is not accessible via a URL.

Move the image out of that folder and it should work fine.

RichardOD
that's right too
Davide Vosti
thanx sir...now its running fine.
Aarsh Thakur
sir can you please see the another problem that is problem with login control that i posted yesterday.please look at ttah..
Aarsh Thakur
A: 

Try to remove the "~/" and replace it with "../" i think it will run ok

Wahid Bitar