Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get the Filename from the FileUpload control?

Status
Not open for further replies.

plasma80

Programmer
Mar 4, 2002
9
US
I have multiple fileupload controls on my form and I want to get the attached file name from the first one. Is there anyway that I can do this?
I normally use this code, but this gets all the attachments:

Set item = webdoc.GetFirstItem( "$File" )
If Not item Is Nothing Then
filename = item.values(0)
End If

Please Help!!! Thanks in advance
 
Currently, I'm using this one (from
@If(!@Attachments; @Return(""); "");
@If(@IsDocBeingEdited;
&quot;<p>Remove attachments here:<br>&quot; +
@Implode(&quot;<input type=\&quot;checkbox\&quot; name=\&quot;%%Detach\&quot; value=\&quot;&quot;+@AttachmentNames+&quot;\&quot;>&quot;+@AttachmentNames; &quot;<br>&quot;);
&quot;<p>View attachments here:<br>&quot; +
@Implode(&quot;<a href=\&quot;&quot; + @Text(@DocumentUniqueID) + &quot;/$file/&quot; + @AttachmentNames + &quot;\&quot;>&quot;+@AttachmentNames + &quot;</a>&quot;; &quot;<br>&quot;))

It's only valid on the web. I don't know if the same can be said for the client.

Fight?
[lightsaber]
What fight? [shocked]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top