473,587 Members | 2,321 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

FileUpload1.Fil eName Question

I am using Visual Web Developer along with SQLExpress on a WinXP Pro
2002 SP2 machine with a 3.79 GHz processor with 2GB of RAM to create
a
web application for entering data to a database. I am using the
following code to call up a filename into a textbox. I use the
textbox
to add the filename to the database along with other information
gathered on my form.

<script runat="server">
Sub UploadButton_Cl ick(ByVal sender As Object, ByVal e As
System.EventArg s)
If (FileUpload1.Ha sFile) Then
Dim dale As String = (FileUpload1.Fi leName)
TextBox1.Text = dale
End If
End Sub
</script>
My problem is that there are instances that the filename cannot be
called up. The connection to the server keeps getting reset -
The connection was reset
The connection to the server was reset while the page was loading.
* The site could be temporarily unavailable or too busy. Try
again in a few
moments.
* If you are unable to load any pages, check your computer's
network
connection.
* If your computer or network is protected by a firewall or
proxy, make sure
that Firefox is permitted to access the Web.
IE gives a similar response.
At first I thought it had something to do with the type of file it
was
trying to get the name from, ie., I got the problem consistently with
files with the .zip extension. I later proved that out as being
incorrect.
When I am sucessful with the filename event, my database updates
correctly.
The filenames I am attempting to retrieve are also on a different
server on the LAN. I am able to use the function to get other
filenames from the same folder with no problem so it doesn't seem to
be a permissions related problem.
I have also copied the file to my desktop and have had no luck
retrieving the filename.
I have been fighting this for days before posting this as I wanted to
give as much information as possible. This, of course, means that I
am
overlooking something very obvious. Let me know what you might think
could be the problem.

Mar 6 '07 #1
0 2377

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

Similar topics

4
1900
by: Michael | last post by:
All, I'll asked a question but I was not detailed (clear) enough for people to help so I'll retry. I have a cgi script pass a variable from one page to the next. The 'receiving' page replaces this variable (in this case %filename%) with whatever was passed. This works fine when the page is called from the cgi script because it has
2
1778
by: kinghuangz | last post by:
Everyone: I want to use a DLL(FileName:PubFunction.Dll) built with VS.Net(C#) in a unmanaged Program .But there was a Dll just has the same filename,it was built with VC++(6.0).The unmanaged was loaded by LoadLibrary function firstly,and it would be free until the Program's end.How can I Load the managed Dll?
10
13047
by: Brian Gruber | last post by:
Hi, I'm looking for a way to rename a whole directory of files in short order. The files in the directory have different lengths, however all of them end with _xxxx the x's represent a randomly generated number from a program that I saved from. So I need to find a way that I can quickly remove the underscore and the last 4 numbers from the...
4
5666
by: Dave | last post by:
If you had a FileUpload control inside of a FormView...how would you use FindControl to access the FileUpload properties? Let me just say that (FileUpload)FormView1.FindControl(FileUpload1).FileName doesn't work. The purpose is to insert a graphic in the InsertItemTemplate section of the form. I'm using the expample that's in the online...
8
1756
by: Lloyd Sheen | last post by:
I have a list of JPG's which are found in a SQL Server database. When the page selects a certain piece of data it will refer to the file system (resident on IIS server with a virtual directory) and files contained within a certain folder. I have been trying for quite a while to set the ImageURL of an image control to the correct information....
1
1354
by: Rafael tejera | last post by:
I'm having problem with a upload file My server is a Microsoft Windows 2003. IIS 6 FileUpload1.PostedFile.SaveAs(InputPath + "\\" + filename); Access to the path 'C:\Inetpub\vhosts\domain\httpdocs\Contents\Member\Default\400ea89b-1.avi'
4
10908
by: bizt | last post by:
Hi, Im looking for a regular expression to check that a entered filename is valid. I have a cms Im building where the user can enter the name of a file, enter content and then click Save where the file is created on the server. I need a regular expression to validate the filename entered prior to this. I have looked on google where i found...
3
2757
by: Codebug | last post by:
Whys does the second "If Len(Dir(Filename)) > 0 Then" function not work in this code, the first one is ok. The files DO exist and both should return 'true'. If I REM the second IF THEN, ELSE, ENDIF statements, it loads the pdf file ok! Private Sub Form_Current() ' Update Cost Sheet, Check Sheet and drive History data on NCR change ...
18
2762
by: RedLars | last post by:
Hi, How can check using .NET 1.1 that a string contains a valid filename for winxp? The application in question has a textbox where user can enter filename and only the filename. It should not allowed to enter path +filename like "c:\tmp\myfile.log" or relative paths "..\tmp \myfile.log" - no directory info should be allowed, only the...
0
7918
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7843
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...
0
8206
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. ...
1
7967
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...
0
8220
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...
0
6621
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...
1
5713
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3875
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1185
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.