954,593 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

How to upload files?

I am using Visual studio 2008 and trying to upload files. Though the file uploaded can be seen through windows explorer, it is not shown in solution explorer.

i am using the following c# code:

String fnm = FileUpload1.FileName;
String cp = Server.MapPath("~/Uploads/");
            
FileUpload1.SaveAs(cp + fnm);
chaitali238
Newbie Poster
7 posts since May 2009
Reputation Points: 10
Solved Threads: 0
 
Though the file uploaded can be seen through windows explorer, it is not shown in solution explorer.

Do you mean the file can be seen in the corresponding local path of the solution? If so, try refreshing the solution explorer and see if it appears.

Regards,

catherine sea
Junior Poster
126 posts since Jan 2008
Reputation Points: 25
Solved Threads: 20
 

No, it doesn't appear in the solution explorer, even if I refresh.

chaitali238
Newbie Poster
7 posts since May 2009
Reputation Points: 10
Solved Threads: 0
 

Try clicking "Show ALL Files" icon in Solution Explorer.

catherine sea
Junior Poster
126 posts since Jan 2008
Reputation Points: 25
Solved Threads: 20
 

How can I insert the file (image/word) in sql server which is get from File upload ctrl ? Can any one give me example ?

vijayvishwanath
Newbie Poster
3 posts since Oct 2011
Reputation Points: 10
Solved Threads: 1
 

Yes dear friend, now I can see it in the solution explorer. Many thanks.

chaitali238
Newbie Poster
7 posts since May 2009
Reputation Points: 10
Solved Threads: 0
 

The "Show All File" icon solved my problem.

chaitali238
Newbie Poster
7 posts since May 2009
Reputation Points: 10
Solved Threads: 0
 

@Vijayviswanath

You are likely to get solutions if you create a new thread with a appropriate thread title for your problem, as your problem is little different from this one.

chaitali238
Newbie Poster
7 posts since May 2009
Reputation Points: 10
Solved Threads: 0
 

For future reference, you can use an ASP.NET control like FileUltimate for this purpose.

desynch
Newbie Poster
5 posts since Feb 2012
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You