Red de conocimiento informático - Espacio del host - Quiero escribir un control de carga de imágenes, pero no sé cómo escribirlo. Tengo expertos que me ayudan y no hay problema. También puedes decirme cómo subirlo.

Quiero escribir un control de carga de imágenes, pero no sé cómo escribirlo. Tengo expertos que me ayudan y no hay problema. También puedes decirme cómo subirlo.

Contáctame vía QQ y te enviaré el código. 974003456Mi código, si tienes alguna duda envíame un mensaje QQ. No hay problema, puntos extra

string ImgName = FileUpload1.PostedFile.FileName;

string ImgExtention = System.IO.Path.GetExtension(ImgName);

int ImgSize = FileUpload1.PostedFile.FileName;

Contáctame vía QQ y te enviaré el código.

int ImgSize = FileUpload1.PostedFile.FileName;

int ImgSize = FileUpload1.PostedFile.ContentLength;

string NewName = DateTime.Now.Year.ToString( ) + DateTime.Now.Year.ToString() + DateTime.Now.DateTime.Now.Day.ToString() + DateTime.Now.DateTime.Now.Day.ToString()DateTime.Now.Day.ToString() + DateTime .Now.Hour.ToString() + DateTime.Now.Minute.ToString() + DateTime.Now.Second.ToString();

string ImgPath = Server.MapPath("works/");

string ImgUrl = "works/" + NewName + ImgExtention;

if (ImgExtention == ".gif")|| ImgExtention == ".GIF"|| .jpg" || ImgExtention == ".JPG" || ImgExtention == ".jpeg" || ImgExtention == ".PNG")

{

if ( ImgSize / 512000 < 1)

{

tiempo de cadena = DateTime.Now.ToString();

FileUpload1.PostedFile.SaveAs(ImgPath + NewName + ImgExtention);

Booleano bl = db.ExecSQL("insertar en food_culture (título,texto,autor,imagen,clase,resumen) valores('").+ txtTile.Text + "' ,'" + Solicitud. Formulario["Contenido"].ToString() + "','" + txt_bianjiren.Text + "','" + ImgUrl + "','1','"+TextBox1.Text+"')");

string str6 = "¡Subido correctamente! !" ;

Response.Write("");

Qingkong();

}

else

{

string str5 = "La imagen que subiste es demasiado grande, ¡la imagen no puede tener más de 1 millón!" ;

Response.Write("");

Qingkong();

}

más

{

>

string str6 = "¡Subido correctamente! Write("");

}

}

{ else

{

string str4 = "Subiste la imagen en un formato incorrecto." ;

Response.Write( "");

}

}