File Upload Code ASP.NET + C#

May 3, 2011 at 10:06 am Leave a comment

string FilePath = “”;
string[] a = new string[1];
string fileName = “”;
string FullName = “”;

if (FileUploader.FileName.Length > 0)
{
a = FileUploader.FileName.Split(‘.’);
fileName = Convert.ToString(System.DateTime.Now.Ticks) + “.” + a.GetValue(1).ToString();
FilePath = Server.MapPath(@”~\SavedFolder”);
Fup1.SaveAs(FilePath + @”\” + fileName);

FullName = FilePath + @”\” + fileName;
// Database Saved Code
}

Advertisement

Entry filed under: asp.net, C#. Tags: , , .

Find stored procedure Drop all stored procedures

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


Calendar

May 2011
M T W T F S S
« Mar    
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

Follow

Get every new post delivered to your Inbox.