473,387 Members | 1,504 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,387 software developers and data experts.

Urgent-How to access image from the server folder

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 the same place
into the application root (server machine) like
c:\inetpub\wwwroot\OrchidDB\Orchid_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.
When I run apllication on server images are display in repeter control but when i run it on client machine it dose not display image.
Once again i show you my code please solve this problem.
it is urgent..

Dim dt As New DataTable("Orchid")
Dim FullPath As String
Dim col As DataColumn
Dim Rowimg As DataRow
'Use strimg --got images name from sql server with comma
'delemeter
Dim strtxt As String = StrImg
'split image name here
Dim StrString() As String = Split(strtxt, ",")
col = New DataColumn("image", GetType(String))
dt.Columns.Add(col)
For Each strtxt In StrString
'It work on server but not work on client machine
FullPath = Server.MapPath("Orchid_Image/" & strtxt)
Rowimg = dt.NewRow
Rowimg.Item("image") = FullPath
dt.Rows.Add(Rowimg)
Next
RepImg.DataSource = dt
RepImg.DataBind()
--------------------------------
From: Manish Songar
m_******@yahoo.com

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

<Id>pkPj2Q87ikyXWqCQojm7Qw==</Id>
Nov 19 '05 #1
1 1930
You don't need to use MapPath. The image url should be set to server
location, like

Orchid_Image/MyImage.jpg

That's it.

Eliyahu

"Manish Songar via .NET 247" <an*******@dotnet247.com> wrote in message
news:O%****************@TK2MSFTNGP09.phx.gbl...
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 the same place
into the application root (server machine) like
c:\inetpub\wwwroot\OrchidDB\Orchid_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.
When I run apllication on server images are display in repeter control but when i run it on client machine it dose not display image. Once again i show you my code please solve this problem.
it is urgent..

Dim dt As New DataTable("Orchid")
Dim FullPath As String
Dim col As DataColumn
Dim Rowimg As DataRow
'Use strimg --got images name from sql server with comma
'delemeter
Dim strtxt As String = StrImg
'split image name here
Dim StrString() As String = Split(strtxt, ",")
col = New DataColumn("image", GetType(String))
dt.Columns.Add(col)
For Each strtxt In StrString
'It work on server but not work on client machine
FullPath = Server.MapPath("Orchid_Image/" & strtxt)
Rowimg = dt.NewRow
Rowimg.Item("image") = FullPath
dt.Rows.Add(Rowimg)
Next
RepImg.DataSource = dt
RepImg.DataBind()
--------------------------------
From: Manish Songar
m_******@yahoo.com

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

<Id>pkPj2Q87ikyXWqCQojm7Qw==</Id>

Nov 19 '05 #2

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

Similar topics

1
by: Heros | last post by:
I had losed my serial key for .net Visual Studio Professional, DVD ROM with the trial version, 60 days, and need urgent to use it to install .net Visual Basic. Please, its urgent. Thanks.
3
by: Rob | last post by:
I have a form - when you click the submit button, it appends a variable to the URL (e.g. xyz.cgi?inputID=some_dynamic_variable) It also opens a new page. Now, that some_dynamic_variable is...
2
by: learner | last post by:
Hi, In a page, i have many links. I have some functions in a global file which is included in all linked pages. I want to have a reference to a window which is to be opened on clicking one link...
9
by: Stefan Bauer | last post by:
Hi NG, we've got a very urgent problem... :( We are importing data with the LOAD utility. The input DATE field data is in the format DDMMYYYY (for days) and MMYYYY (for months). The target...
28
by: Tamir Khason | last post by:
Follwing the struct: public struct TpSomeMsgRep { public uint SomeId;
4
by: EricJ | last post by:
the click event of a picturebox gives an e As System.EventArgs but this e dousnt contain xy coordinates of the click (and yes i need those :/) Private Sub picSchade_Click(ByVal sender As...
7
by: zeyais | last post by:
Here is my HTML: <style> ..leftcolumn{float:left;width:300px;border: 1px solid #ccc} ..rtcolumn{float:left;width:600px;border: 1px solid #ccc} </style> <body> <div class="leftcolumn"...
33
by: dembla | last post by:
Hey Frnds can anyone help me in this i need a program in 'c' PROGRAM to print NxN Matrix 9 1 8 1 2 3 2 7 3 as 4 5 6 6 4 5 7 8 9 in sorted form
1
by: alok sengar | last post by:
hi, I have already tried this URL's code "http://www.java2s.com/Code/CSharp/Network/SimpleSNMP.htm" but I am getting error when i am creating a UDP type Socket and recieving packet from this...
3
by: N. Spiker | last post by:
I am attempting to receive a single TCP packet with some text ending with carriage return and line feed characters. When the text is send and the packet has the urgent flag set, the text read from...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
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.