Jump to content
Xtreme .Net Talk

Recommended Posts

Posted (edited)

I am getting pretty good pretty fast with asp.net but how do i get the date month and year as a string, i need them in seperate variables, year as 20XX, month as XX, day as XX can anyone help?

 

one last question, will this when it saves make a new dir if it doesnt exist? if no how do i make it do so?

 

 If Not (File16.PostedFile Is Nothing) Then

     File16.PostedFile.SaveAs("c:\upload\" Region & "\" & Tech & "\" &  DATE "\J4QC3.jpg")
     lblMsg16.Text = "Job 4 QC 3 Upload successfull."

  End If

 

 

 

Thanks,

 

Jimmy

Edited by Robby
Posted
system.IO.Directory.CreateDirectory will allow you to create a new folder.

 

how to specify for which dirs to make, region, tech, year and month will most likely already be there, how to check and make sure that those folders are there and if not create one? or just specify the command and c:\uploads\year\month\day and it will make just the day since thats all it needs?

 

and maybe an example?

 

please respond, thanks in advance

Posted

uh oh where did i goof? it makes the files even if nothing is in the file box?

 

HELP?

 

I am getting pretty good pretty fast with asp.net but how do i get the date month and year as a string, i need them in seperate variables, year as 20XX, month as XX, day as XX can anyone help?

 

one last question, will this when it saves make a new dir if it doesnt exist? if no how do i make it do so?

 

 If Not (File16.PostedFile Is Nothing) Then

     File16.PostedFile.SaveAs("c:\upload\" Region & "\" & Tech & "\" &  DATE "\J4QC3.jpg")
     lblMsg16.Text = "Job 4 QC 3 Upload successfull."

  End If

 

 

 

Thanks,

 

Jimmy

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...