kindeditor.NET???????
protected void Button1_Click(object sender, EventArgs e) { if (IsPostBack) { Boolean fileOK = false; String path = Server.MapPath(~/UploadedImages/); if (FileUpload1.HasFile) { String fileExtension = System.IO.Path.GetExtension(FileUpload1.FileName).ToLower(); String[] allowedExtensions = { .gif, .png, .jpeg, .jpg }; for (int i = 0; i < allowedExtensions.Length; i++) { if (fileExtension == allowedExtensions[i]) { fileOK = true; } } } if (fileOK) { try { FileUpload1.PostedFile.SaveAs(path + FileUpload1.FileName); Label1.Text = File uploaded!; } catch (Exception ex) { Label1.Text = File could not be uploaded.; } } else { Label1.Text = Cannot accept files of this type.; } } }ú?MSDN?,?
?(;31c)??????
Hash:95fa23d9838ba2260006c215b2539f6c3781450d
聲明:此文由 maylee 分享發(fā)布,并不意味本站贊同其觀點(diǎn),文章內(nèi)容僅供參考。此文如侵犯到您的合法權(quán)益,請(qǐng)聯(lián)系我們 kefu@qqx.com