ANTICHAT.XYZ    VIDEO.ANTICHAT.XYZ    НОВЫЕ СООБЩЕНИЯ    ФОРУМ  
Баннер 1   Баннер 2
Antichat снова доступен.
Форум Antichat (Античат) возвращается и снова открыт для пользователей. Здесь обсуждаются безопасность, программирование, технологии и многое другое. Сообщество снова собирается вместе.
Новый адрес: forum.antichat.xyz
Вернуться   Форум АНТИЧАТ > Оффтоп > Forum for discussion of ANTICHAT
   
Ответ
 
Опции темы Поиск в этой теме Опции просмотра

ASP.NET - Uploading files to the server
  #1  
Старый 28.02.2007, 17:11
Аватар для Dracula4ever
Dracula4ever
Постоянный
Регистрация: 08.05.2006
Сообщений: 559
Провел на форуме:
1593567

Репутация: 354


Отправить сообщение для Dracula4ever с помощью ICQ Отправить сообщение для Dracula4ever с помощью AIM Отправить сообщение для Dracula4ever с помощью Yahoo
По умолчанию ASP.NET - Uploading files to the server

A while ago I answered a question about uploading files from an ASP.net application on walla.co.il … So here is the tip:

To let your users upload files from their computer to the server you can use a great contol called “FileUpload” control.

To use the control, just put the code below into the POST event and the file that the user asked to upload will be uploaded to the server: (Note: oFile is the FileUpload control)

PHP код:
if (oFile.PostedFile != null)
{
string fullFileName oFile.PostedFile.FileName//getting the path
string fileName System.IO.Path.GetFileName(fullFileName); //getting the 
filenameoFile.PostedFile.SaveAs(Server.MapPath(string.Empty) + \\” fileName); //saving the file on the demand directory on the server file system

Note: this code checks if a file was really sent before trying to save it.

Последний раз редактировалось Dracula4ever; 03.03.2007 в 09:08..
 
Ответить с цитированием
Ответ



Похожие темы
Тема Автор Раздел Ответов Последнее сообщение
Proxies KPOT_f!nd ICQ 2617 22.06.2008 13:30
Hacking Linux Server with Reading Files or OpenSSL RuL3r Forum for discussion of ANTICHAT 0 17.06.2006 11:50



Здесь присутствуют: 1 (пользователей: 0 , гостей: 1)
 


Быстрый переход




ANTICHAT.XYZ