ASP.NET - IMAGE PROBLEM - Asked By Prashant Mehta on 19-Jun-12 02:56 PM

Earn up to 10 extra points for answering this tough question.
I M NOT ABLE TO C IMAGE DURING RUNTIME IT IS SEEN DURING DESIGN TIME ONLY WHY IS IT SO??  PLSS HELP ME OUT
S K replied to Prashant Mehta on 19-Jun-12 11:50 PM
It sounds like you may have a URL mapping issue of some kind So first of all you should try ImageURL property setting to path like this "~/Images/MyImage.png"
Also note that image should be store in image folder instead of app_theme folder, because the App_Theme directory is handled differently at runtime.
You should point to a relative image path when using it in the code.This way, when the image is stored on the server, it can be located.

hope this helps you
Jitendra Faye replied to Prashant Mehta on 20-Jun-12 12:13 AM
For this put you images in your solution directory structure, and display image like this-

Suppose I have put image in Image folder then use this code-


Image1.ImageUrl = "~/image/myimage.jpg";


Try this and let me know;



Neha Garg replied to Prashant Mehta on 20-Jun-12 01:16 AM
Hi Prashant,

put the images folder in the root directory and refer url like below

 

ImageUrl="~/Images/imagefilename.png"

 

Also check the path which the browser is trying to access to display the image....

dipa ahuja replied to Prashant Mehta on 20-Jun-12 04:47 AM
1. try to add image in another page and check if it is working.

2. choose that image from the property window by choosing file from the select Item dialog box
Prashant Mehta replied to S K on 20-Jun-12 02:47 PM
thnk u veryyyyyyyyyyyyyyyyyyy much i luv u for this from whn i was trying...... but now it is done.

        THNK U VERYYYYYYY MUCH
Prashant Mehta replied to dipa ahuja on 20-Jun-12 02:55 PM
HEY I M CREATING A WEBSITE i.e "FORUM WEBSITE" SIMILAR TO EGGHEADCAFE

   CN ANY ONE HELP ME OUT IN DESIGNING THE WEBSITE I M NOT GETTING ANY IDEA PLSS SEND ME SOME DESIGN IN DETAIL ,THAT WHICH ALL CONTROL I NEED TO PUT AND ALL IN DETAILS PLSSS


REPLY ME AS SOON AS POSSIBLE  

   THNK U AGAIN FOR HELPING ME IN MY IMAGE PROBLEM

Prashant Mehta replied to S K on 20-Jun-12 02:56 PM
HEY I M CREATING A WEBSITE i.e "FORUM WEBSITE" SIMILAR TO EGGHEADCAFE

   CN ANY ONE HELP ME OUT IN DESIGNING THE WEBSITE I M NOT GETTING ANY IDEA PLSS SEND ME SOME DESIGN IN DETAIL ,THAT WHICH ALL CONTROL I NEED TO PUT AND ALL IN DETAILS PLSSS


REPLY ME AS SOON AS POSSIBLE  

   THNK U AGAIN FOR HELPING ME IN MY IMAGE PROBLEM

dipa ahuja replied to Prashant Mehta on 20-Jun-12 02:56 PM
There are two ways of it
 
1. Create your own code for forums. for that you have to create atleast two tables and all the logic
 
2. Install the forum which is available ready made you just have to integrate it, download and install from here:
 
http://www.jitbit.com/asp-net-forum/
[)ia6l0 iii replied to Prashant Mehta on 20-Jun-12 10:48 PM
A quicker way to figure out image url issues - is to right-click on the image, and choose properties (IE). It will show you the path. In chrome - you would right click and choose "copy image url". Examine the url and you would know why the image isn't displayed at runtime.

P.S - Please turn Caps Lock Off.
S K replied to Prashant Mehta on 21-Jun-12 06:18 AM
You welcome.
S K replied to Prashant Mehta on 21-Jun-12 06:22 AM
When you create any project first thing you should keep in mind fixed the requirement than you make desgin and create layout. After that you will do code for that one.