473,394 Members | 1,715 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

How to access image from the server folder

(Type your message here)
I am using asp.net. I am not storing image in sql server.I store all
the image in one folder. I want to access image from that folder to my
client machine. Images folder (\Data_Image) store in the same place
into the application root (server machine) like
c:\inetpub\wwwroot\mywebapp\Data_Image. I am using repeter control for
show images. I already use server.Mappath but still when I run my
application in client machine it still look for the image on client
machine itself. Is am I doing wrong....
My code as followes:

Dim dt As New DataTable("Orchid")
Dim FullPath As String
Dim col As DataColumn
Dim Rowimg As DataRow
col = New DataColumn("image", GetType(String))
dt.Columns.Add(col)
FullPath = Server.MapPath(".") & "\data_Image\" & Rose.GIF
Rowimg = dt.NewRow
Rowimg.Item("image") = FullPath
dt.Rows.Add(Rowimg)
RepImg.DataSource = dt
RepImg.DataBind()
can anybody solve my problem.
--------------------------------
From: Manish Songar
m_******@yahoo.com

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>8a/SkuT00U+SOc2vhgsosg==</Id>
Nov 19 '05 #1
1 1192
Hi Manish:

You want to send the result of Server.MapPath to the client, because
MapPath returns a physical directory on the server. Just use the
relative path to the image and the client should see it just fine.

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Sat, 09 Apr 2005 05:17:33 -0700, Manish Songar via .NET 247
<an*******@dotnet247.com> wrote:
(Type your message here)
I am using asp.net. I am not storing image in sql server.I store all
the image in one folder. I want to access image from that folder to my
client machine. Images folder (\Data_Image) store in the same place
into the application root (server machine) like
c:\inetpub\wwwroot\mywebapp\Data_Image. I am using repeter control for
show images. I already use server.Mappath but still when I run my
application in client machine it still look for the image on client
machine itself. Is am I doing wrong....
My code as followes:

Dim dt As New DataTable("Orchid")
Dim FullPath As String
Dim col As DataColumn
Dim Rowimg As DataRow
col = New DataColumn("image", GetType(String))
dt.Columns.Add(col)
FullPath = Server.MapPath(".") & "\data_Image\" & Rose.GIF
Rowimg = dt.NewRow
Rowimg.Item("image") = FullPath
dt.Rows.Add(Rowimg)
RepImg.DataSource = dt
RepImg.DataBind()
can anybody solve my problem.
--------------------------------
From: Manish Songar
m_******@yahoo.com

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>8a/SkuT00U+SOc2vhgsosg==</Id>


Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Ian B | last post by:
This is a basic question for anyone who knows what they're doing with web server admin so hopefully someone will be able to assist me here!... I have a www based asp.net application which allows...
1
by: Manish Songar via .NET 247 | last post by:
(Type your message here) I am using asp.net. I am not storing image in sql server.I storeall the image in one folder. I want to access image from thatfolder to my client machine. Images folder...
1
by: Manish Songar via .NET 247 | last post by:
I am using asp.net. I am not storing image in sql server.I store all the image in one folder. I want to access image from that folder to my client machine. Images folder (\Orchid_Image) store in...
13
by: Neo Geshel | last post by:
I have examined about 80+ different upload scripts on the 'net, both in VB and C#, and none seem to do what I need them to do. Perhaps someone here can point me somewhere that Google hasn't...
35
by: Stan Sainte-Rose | last post by:
Hi, What is the better way to save image into a database ? Just save the path into a field or save the image itself ? I have 20 000 images (~ 10/12 Ko per image ) to save. Stan
3
by: Thomas Satzinger | last post by:
Hallo., i just encounterd a strange thing which i cannot resolve. I am saving a bitmap created in memory to the asp temp folder (asp.net 2.0) this works fine, and i donīt want to create an...
9
by: Wayne Smith | last post by:
I've come up against a major headache that I can't seem to find a solution for but I'm sure there must be a workaround and I would really be grateful of any help. I'm currently building a web...
6
by: Bob Alston | last post by:
I am looking for others who have built systems to scan documents, index them and then make them accessible from an Access database. My environment is a nonprofit with about 20-25 case workers who...
0
by: Mark Gold | last post by:
Hi! We have a VB application using Crystal Reports 6 that has worked successfully on hundreds of systems for over 10 years. Now, on one network, the application and access database does not close....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.