HighTechTalks DotNet Forums  

uploading unique documents

Dotnet Scripting microsoft.public.dotnet.scripting


Discuss uploading unique documents in the Dotnet Scripting forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
vncntj@hotmail.com
 
Posts: n/a

Default uploading unique documents - 09-28-2006 , 02:41 PM






I'm uploading documents and I want to do two things.

1. Only upload .doc files
2. I'm applying the Session.SessionID to the Filename to give it
uniqueness. Is this approach logical?

<script language="c#" runat="server">
void UploadFile_Clicked(Object src, EventArgs E)
{
string FileName;
string uploadDirectory = "C:\\Resumes\\";

FileName=uploadFile.PostedFile.FileName;
FileName=Path.GetFileName(FileName);

//restricting users to only upload .doc files.
uploadFile.PostedFile.SaveAs(uploadDirectory + Session.SessionID
+FileName);

UploadFormPanel.Visible = false;
uploadedFileInfoPanel.Visible = true;

}
</script>


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.