Ver Mensaje Individual
  #6 (permalink)  
Antiguo 23/06/2009, 07:11
Alfredocox
 
Fecha de Ingreso: junio-2009
Ubicación: Montevideo
Mensajes: 2
Antigüedad: 14 años, 10 meses
Puntos: 0
Respuesta: se pueden crear carpetas con asp.net??

[QUOTE=Jose_minglein2;1100293]Dim a As System.IO.Directory
a.CreateDirectory(path)[/QUOt
acabo de solucionar este mismo problemita :

lo hice asi:


// this.Server.MapPath(".") muestra el directorio donde corre el sitio
// necesito esto para crear el directorio ya que para hacerlo necesito
// la direccion absoluta de su ubicacion. El "./Carpeta_a_crear" no funciona
// pide permisos

string path = this.Server.MapPath(".") + "/Carpeta_a_crear";
DirectoryInfo dir = new DirectoryInfo(path);
try
{

if (dir.Exists)
{

Button7.Attributes.Add("language", "javascript");
Button7.Attributes.Add("OnClick", "return confirm('El directorio ya existe');");

return;
}
else {

dir.Create();
Button7.Attributes.Add("language", "javascript");
Button7.Attributes.Add("OnClick", "return confirm('El directorio fue creado exitosamente');");

}
// los mensajes aparecen al hacer clic por segunda vez en el boton