can't see my picture on the form - asp.net
i add Image control to my WebForm.
i insert picture to App_Data.
i connect the picture to my Image control in the ImageUrl
it seen like this:
<asp:Image ID="Image1" runat="server" Height="94px"
ImageUrl="~/App_Data/T开发者_JS百科ulips.jpg" Width="209px" />
in the design i see this picture, but when i run the project i dont see the picture.
what can be the problem ?
App_Data is a special folder in ASP.NET that only must be used to store data and files that aren't intended to be accessed by end users (ie. via a web browser). Try to put your picture in another folder, ie. Images.
See http://msdn.microsoft.com/en-us/library/ex526337.aspx for more info.
I've not tried it, but it's probably because you put the image in the App_Data folder. That's not the appropriate place for it. Create an images folder and put it there and try again.
App_Data allows you to use a file-based database that includes SQL Server 2005 and Access, XML files,Excel worksheets or any file-based data store. Create a separate folder in your project and place your image in that folder.
精彩评论