Change them to:
Dim imageBig as String = "Image file.jpg"
Dim path as String = *Server.ResolveURL*("~/Resource/Images/Big/" + imageBig
)
Control.ImageURL= path
*DONT USE* Server.MapPath. This function return the physical path on hosting
server. e.g C:\WWW\Resources\ ....
On Thu, Nov 11, 2010 at 6:25 PM, Abhinandan <[email protected]>wrote:
> Hi all,
>
> I have a issue in getting the image displayed on the page.
>
> I have a user control which has to the Image Control. This user
> control is place in ~\UserControl\BaseData\Admin
>
> I am calling this user control in a aspx page which is the folder ~
> \Pages\BaseData\Admin
>
> I have the images place in the Folder ~\Resource\Images\Big\
>
> I have to pick a certain image from the image folder and diaply it on
> the page. I need some help in doing this.
>
>
> Dim path as String = Server.MapPath("~\Resource\Images\Big")
> Dim imageBig as String = getting the name of the image from database.
> let say example.jpg
>
> i am setting the image Control.ImageURL = path & imageBig
>
> The above code is in the page_load of user control.
>
> i believe the fix is very simple but i am not getting the solution.
> some help.
>
> Thanks