Ask a Question related to ASP.NET General, Design and Development.
-
Helixpoint #1
How to check for a file before I upload??
I upload a file with the following code. Is there a way to check to see if
the file is currently there before I upload?
Dim s1 As String
Dim s2 As String
Dim pos As Integer
s1 = file1.PostedFile.FileName
pos = s1.LastIndexOf("\") + 1
s2 = s1.Substring(pos)
file1.PostedFile.SaveAs("C:\Inetpub\wwwroot\xxxxx\ images\machines\" & s2)
file_uploaded.Text = "<strong>" & s2 & " has been uploaded!</strong>"
' Add a new userRole to the database
Dim MachID = Session("selectedMachineID")
Dim admin As New ASPNETProduct.machinedb
admin.AddMachImage(MachID, s2)
--
______________________
David Fetrow
HelixPoint LLC.
[url]http://www.helixpoint.com[/url]
[email]davef@helixpoint.com[/email]
Interested in Affordable Email Marketing?
Check out the HelixMailer at [url]http://www.helixpoint.com/helixmailer.asp[/url]
If you are interested in becoming a Reseller of HelixPoint products, contact
[email]davef@helixpoint.com[/email]
______________________
Helixpoint Guest
-
How to upload a file to 2 FTP sites without an upload component for company
Hi All I can't get round this because it's a local government thing, but I've done a CMS for a school (in ASP classic) that allows them to upload... -
Upload Friendly (Multiple File Upload Applet)
Title : Upload Friendly (Multiple File Upload Applet) Description : UploadFriendly is an easy to use Java Applet that will allow multiple file... -
LWP - multipart/form-data file upload from scalar rather than local file
I'm looking to do an HTTP upload, preferably with HTTP::Request::Common, but get the file data from either a filehandle or a scalar rather than... -
#24574 [NEW]: File corruption during file upload
From: ivan at artenergy dot com Operating system: FreeBSD 4.7/Apache1.3.27 PHP version: 4.3.2 PHP Bug Type: Filesystem... -
how to upload an image selected from html file to flash file?
Hello, I have one html file and a flash file. In html file, it is functioning like choosing a Tshirt to design, then how to load that Tshirt picture... -
bruce barker #2
Re: How to check for a file before I upload??
the only way for the browser to send the filename is to post the file. you
can check on the server side, and display an error if the file exits, but
the client pays the upload cost (delay) before the message appears.
if you want the client to check first, send a list of uploaded files to the
client (say in a hidden field) and have client code triggered by the
onsubmit event, check if it has already been uploaded. just a couple lines
of javascript.
-- bruce (sqlwork.com)
"Helixpoint" <dave@helixpoint.com> wrote in message
news:#zwDv1WTDHA.600@TK2MSFTNGP12.phx.gbl...contact> I upload a file with the following code. Is there a way to check to see if
> the file is currently there before I upload?
>
> Dim s1 As String
> Dim s2 As String
> Dim pos As Integer
> s1 = file1.PostedFile.FileName
> pos = s1.LastIndexOf("\") + 1
> s2 = s1.Substring(pos)
> file1.PostedFile.SaveAs("C:\Inetpub\wwwroot\xxxxx\ images\machines\" & s2)
> file_uploaded.Text = "<strong>" & s2 & " has been uploaded!</strong>"
> ' Add a new userRole to the database
> Dim MachID = Session("selectedMachineID")
> Dim admin As New ASPNETProduct.machinedb
> admin.AddMachImage(MachID, s2)
>
>
> --
>
> ______________________
> David Fetrow
> HelixPoint LLC.
> [url]http://www.helixpoint.com[/url]
> [email]davef@helixpoint.com[/email]
>
> Interested in Affordable Email Marketing?
> Check out the HelixMailer at [url]http://www.helixpoint.com/helixmailer.asp[/url]
> If you are interested in becoming a Reseller of HelixPoint products,> [email]davef@helixpoint.com[/email]
> ______________________
>
>
bruce barker Guest



Reply With Quote

