try
{
SPList listaGov = oWebsite.Lists["Governance"];
SPView view = listaGov.DefaultView;
if (view.ViewFields.Exists("Responsabilidad"))
contenido.InnerHtml += "Ya existe";
else
{
oWebsite.AllowUnsafeUpdates = true;
view.ViewFields.Add("Responsabilidad");
view.Update();
oWebsite.AllowUnsafeUpdates = false;
contenido.InnerHtml += "Vista default actualizada";
}
}
catch (Exception error)
{
contenido.InnerHtml += "Error: " + error;
}
0 comentarios:
Publicar un comentario