C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




small vb.net application


Posted Date: 16 Oct 2008      Total Responses: 2

Posted By: suresh       Member Level: Bronze     Points: 1


hello friends
I want to upload a file (any type of file like pdf,wor,excel) say when i click the browse button and select upload button on my form vb.net .

thank you





Responses

Author: divya    16 Oct 2008Member Level: GoldRating:     Points: 2
Dim fileName As String
If (FileUpload1.PostedFile.ContentLength <> 0) Then
Dim file As String = FileUpload1.PostedFile.FileName
fileName = System.IO.Path.GetFileName(file)
fileName = "" + txtUsername.Text.ToString() + " " & fileName
Else
fileName = ""
End If

If (fileName <> "") Then
FileUpload1.PostedFile.SaveAs(Server.MapPath("Uploads") + "\\" + fileName)
seek.ResumePath = "Uploads/" + fileName
Else
seek.ResumePath = ""

End If


Author: divya    16 Oct 2008Member Level: GoldRating:     Points: -10
Dim fileName As String
If (FileUpload1.PostedFile.ContentLength <> 0) Then
Dim file As String = FileUpload1.PostedFile.FileName
fileName = System.IO.Path.GetFileName(file)
fileName = "" + txtUsername.Text.ToString() + " " & fileName
Else
fileName = ""
End If
dim ResumePath as string
If (fileName <> "") Then
FileUpload1.PostedFile.SaveAs(Server.MapPath("Uploads") + "\\" + fileName)
ResumePath = "Uploads/" + fileName
Else
ResumePath = ""

End If



Post Reply
You must Sign In to post a response.
Next : sso
Previous : difference between .net framework 2 & 1 & 3
Return to Discussion Forum
Post New Message
Category: .NET

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design

doors in nj

Contact Us    Privacy Policy    Terms Of Use