One example code uploaded by the file

xiaoxiao2021-04-07  339

The following is the single file upload:

System.drawing.Image Image, NewImage; / / Define objects of Image classes

protected string imagepath; // Picture Path

protected string iMageType; // Picture type

Protected string imagename;

protected system.web.ui.webcontrols.radiobuttonlist choice; // Picture Name

System.drawing.Image.getthumbnailimageabort callb = null; // Provides a callback method to determine when the Image object is executed in advance when performing a thumbnail operation, if this method determines that the getthumbnailimage method should stop executing in advance, return true, return true, return TRUE Otherwise returning false

Code: [Copy to CLIPBOARD]

-------------------------------------------------- ------------------------------

Private void btn_upload_click (Object Sender, System.Eventargs E)

{

String mpath, IMG_Source, IMG_SMALL;

String Pid = Request.QueryString ["PID"];

String TypeId = Request.QueryString ["TypeID"];

String typef = request.queryString ["typef"];

IF (""! = Upimage.postedFile.FileName)

{

ImagePath = Upimage.postedFile.FileName;

// get a picture type

ImagePath.Substring (ImagePath.lastIndexof (".") 1);

// get the picture name

ImageName = datetime.now.year.tostring () DateTime.now.month.tostring () DateTime.now.day.tostring () DateTime.now.hour.tostring () DateTime.now.minute.toString ( ) DateTime.now.second.toString () ImagePath.Substring (ImagePath.lastIndexof)

// ") 1);

IF ("JPG"! = ImageType && "GIF"! = iMagtype)

{

Response.write ("