コード例 #1
0
        protected void btnSubir_Click(object sender, EventArgs e)
        {
            if (fuploadImagen.HasFile)
            {
                //opteniendo la extension
                string ext = System.IO.Path.GetExtension(fuploadImagen.FileName);
                ext = ext.ToLower();
                //optener nombre archivo
                string nom = fuploadImagen.FileName;
                //configurando el tamaño en bytes
                //int tam = fuploadImagen.PostedFile.ContentLength;
                //Response.Write(ext + ", " + tam);
                //guardamos en el servidor
                fuploadImagen.SaveAs(Server.MapPath("~/PublicacionesImagenes/" + fuploadImagen.FileName));

                ServicioW.ServicioSoapClient mi = new ServicioW.ServicioSoapClient();


                mi.mtdRegistrarFoto(nom, int.Parse(lblId.Text));
            }
            else
            {
                Response.Write("Cargue Imagen...");
            }
        }