Ver Mensaje Individual
  #19 (permalink)  
Antiguo 08/04/2008, 15:41
Avatar de Peterpay
Peterpay
Colaborador
 
Fecha de Ingreso: septiembre-2007
Ubicación: San Francisco, United States
Mensajes: 3.858
Antigüedad: 16 años, 8 meses
Puntos: 87
Re: Form para connection strings?

Al no ser web (sorry si no me fije en ello)

lo q te queda es leer y modificar el xml por tu cuenta

public void UpdateKey(string strKey, string newValue)
{
if (!KeyExists(strKey))
throw new ArgumentNullException("La llave", "<" + strKey +
"> No existe en la configuracion de la aplicacion.");
XmlNode appSettingsNode =
xmlDoc.SelectSingleNode("configuration/appSettings");
// Attempt to locate the requested setting.
foreach (XmlNode childNode in appSettingsNode)
{
if (childNode.Attributes["key"].Value == strKey)
childNode.Attributes["value"].Value = newValue;
}
xmlDoc.Save(AppDomain.CurrentDomain.BaseDirectory +
"..\\..\\App.config");
xmlDoc.Save(AppDomain.CurrentDomain.SetupInformati on.ConfigurationFile);
}

algo asi

pero vas a tener q modificar el xml a mano
__________________
Curso WF4
http://cursos.gurudotnet.com/ DF
Aprende HTML5