473,394 Members | 1,709 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 can i display image from network folder?

imgPhoto.ImageLocation = My.Settings.PhotoPath & txtVno.Text.Trim & ".jpeg"

I want to get flexible extension .jpeg or .jpg or .JPG or .JPEG.
And then Another question is
"How can i know Image is valid or not?"
Sep 17 '10 #1
1 2236
!NoItAll
297 100+
It appears you are trying to force the extension to ".jpeg" - but that probably will not work for you as you need to load the Image Control with an actual and existing file. If you change the reference to the file name it will not match and will not load. Just don't worry about the extension - if the file is a JPG (or JPEG) - or any legitimately common image file - it will load into the control just fine. Also, you must come from the Eunuchs world because in Windows file names are NOT case sensitive so don't worry about that either (e.g. JPG is the same as jpg is the same as JpG ... etc).
If you need to check the validity of the JPEG the easiest way is to use a try block - which will give you an exception to handle (with a message) if the file is not proper.
And in terms of loading from a network folder .. it's the same as loading it from the local drive - provided you have access to the network folder. You can use a mapped drive or a UNC - but I suggest you use a UNC since mapped drives in Windows tend to wonder aimlessly in and out of existence using some whimsical heuristic developed in a Redmond dungeon.
Sep 21 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: PeterNZ | last post by:
Hi all, I developped an C# app which is using FileSystemWatcher. If a file is created in a specific folder, it opens the file and does some processing. This functionality works without...
0
by: Qindong Zhang | last post by:
My asp.net application send image to web browser. The browser begin to display image before download finished. (In Slow Network). How can I force brower to display image after the image downloaded? ...
1
by: Vani | last post by:
Hi All, Is it possible to save a file on a network folder from a web application which is developed in ASP.Net. I tried mapping a network folder on the server and tried to save a file on that...
3
by: Ed Chiu | last post by:
Hi, I want to use VB.Net to access a network folder, say \\myServer\myFolder, and enumerate all files in that folder and process each file one by one. Please provide some sample codes. Thanks!
5
by: Mitchell S. Honnert | last post by:
Is there a way, given the full path of a folder on a network, that one can programatically tell if you have Read access to that folder? I have an application where the user is able to select a...
4
by: Dixie | last post by:
I want to send a file to each persons home network space. I believe that when a person logs onto a network, some sort of variable is set that identifies the user. Is there any code that would...
0
by: doneholmes | last post by:
I have an ASP application that runs on our company intranet. The script checks a folder structure within a network share and, if it contains any files, provides the user a link to the directory. My...
2
by: daniel.navarro.murillo | last post by:
Hi all, I need to open a video player from vb.net and play on it a movie that is stored in a network folder. I'm trying with Process class but the movie file is on a protected folder and I need...
1
by: ArunRJ | last post by:
Hi All, I am new to the networking field. I recently had to share a folder in a Windows XP machine A with another XP machine B. The folder in machine A has some .xls files which I need to access...
0
by: dbdb | last post by:
hi, i work with ms. access 2003 i want to display image from a folder to the report. i have read thread in http://bytes.com/topic/access/answers/191611-pictures-access-reports but that's...
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:
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
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
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?
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
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
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...

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.