hi......
any doubt of related to this you can simply checjk this link........
Mega site of Bible studies and information
here you get all answer of your question related to this......
hey, can any one know how can we upload or download any file in asp? means can any one give me code for uploading or downloading any file...in asp?
hi......
any doubt of related to this you can simply checjk this link........
Mega site of Bible studies and information
here you get all answer of your question related to this......
#33 - Most Discussed (This Month) - Global
#20 - Most Discussed (This Month) - Comedy - Global
#14 - Most Viewed (This Month) - Global
#3 - Most Viewed (This Month) - Comedy - Global
#1 - Top Favourited (This Month) - Global
#1 - Top Favourited (This Month) - Comedy - Global
#4 - Top Rated (This Month) - Global
#1 - Top Rated (This Month) - Comedy - Global
#17 - Top Rated (All Time) - Global
#2 - Top Rated (All Time) - Comedy - Global
Magmahost.com - Affordable Hosting Services
Shared Hosting = $1.00 | Reseller Hosting = $6.95
Click here to visit Magmahost
For uploading file on the server you need appropriate permission to write content in the location. [ Host_Name\ ASPNET ] user must have the permission in the specified folder.
Code:
private void Button1_Click(object sender, System.EventArgs e)
{
if((this.file1.PostedFile !=null) && (this.file1.PostedFile.ContentLength >0))
{
try
{
string FileName=System.IO.Path.GetFileName(file1.PostedFi le.FileName);
string SaveLocation=Server.MapPath("Data") + "\\" + FileName;
this.file1.PostedFile.SaveAs(SaveLocation);
Response.Write("File Uploaded !");
}
catch(Exception Ex)
{
Response.Write(Ex.Message);
}
}
}
You can use FileUplaod control given in toolbox.
It is easy to use.................
There are currently 1 users browsing this thread. (0 members and 1 guests)
|
||||
Bookmarks