473,811 Members | 2,767 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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\wwwr oot\OrchidDB\Or chid_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("Orch id")
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("ima ge", 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_Ima ge/" & strtxt)
Rowimg = dt.NewRow
Rowimg.Item("im age") = FullPath
dt.Rows.Add(Row img)
Next
RepImg.DataSour ce = dt
RepImg.DataBind ()
--------------------------------
From: Manish Songar
m_******@yahoo. com

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

<Id>pkPj2Q87iky XWqCQojm7Qw==</Id>
Nov 19 '05 #1
1 1950
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*******@dotn et247.com> wrote in message
news:O%******** ********@TK2MSF TNGP09.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\wwwr oot\OrchidDB\Or chid_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("Orch id")
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("ima ge", 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_Ima ge/" & strtxt)
Rowimg = dt.NewRow
Rowimg.Item("im age") = FullPath
dt.Rows.Add(Row img)
Next
RepImg.DataSour ce = dt
RepImg.DataBind ()
--------------------------------
From: Manish Songar
m_******@yahoo. com

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

<Id>pkPj2Q87iky XWqCQojm7Qw==</Id>

Nov 19 '05 #2

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

Similar topics

1
1721
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
2447
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 actually the name of a form element on the parent window. On the new page, I have this javascript: ---- var var2 = location.search.substring(9); document.write(var2)
2
1640
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 and it should be known only to one more link on that page and not to other links. I cant have that window reference in that global file, since iam declaring it initially as Null and modifying its value in that one particular link. Since all links...
9
4324
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 data format is european DD.MM.YYYY (for days) and 01.MM.YYYY (for months). The input format is not recognizable as a DATE input to a DB2 LOAD for
28
3074
by: Tamir Khason | last post by:
Follwing the struct: public struct TpSomeMsgRep { public uint SomeId;
4
1864
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 System.Object, ByVal e As System.EventArgs) Handles picSchade.Click getting desperate here (they have to present it tomorrow morning)
7
7263
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" id="d_links"> multiple <a href="hello.aspx?q=something">something</a><a href="hello.aspx?q=something1">something1</a><a
33
3447
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
1930
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 socket. some time error is---"An existing connection was forcibly closed by the remote host" and some time error is--- "A connection attempt failed because the connected party did not properly respond after a period of time, or established...
3
6482
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 the socket is missing the last character (line feed). When the same text is sent without the urgent flag set, all of the characters are read. I'm reading the data using the blocking read call of the network stream class. The .NET...
0
9605
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10647
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10386
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10398
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10133
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9204
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6889
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4339
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3865
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.