HOME FORUMS MEMBERS RECENT POSTS LOG IN  
× Авторизация
Имя пользователя:
Пароль:
Нет аккаунта? Регистрация
Баннер 1   Баннер 2
НОВЫЕ ТОРГОВАЯ НОВОСТИ ЧАТ
loading...
Скрыть
Вернуться   ANTICHAT > ОФФТОП > Forum for discussion of ANTICHAT
   
Ответ
 
Опции темы Поиск в этой теме Опции просмотра

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

Репутация: 354


По умолчанию 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 Skype, IRC, ICQ, Jabber и другие IM 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 ™ © 2001- Antichat Kft.

×

Внести депозит

Введите сумму USDT:

Принимается только USDT TRC20. Fake/Flash USDT не засчитывается.

×

Вывести депозит

Сумма USDT:

Ваш USDT TRC20 кошелек:

Заявка будет отправлена администратору.