Tag Info

New answers tagged

1

off the top of my head, I dont know but i think there is most certanly a easyier solution than what im about to propose, using (SPSite site = new SPSite("http:...")) { using(SPWeb web = site.OpenWeb()) { SPList list = web.Lists.TryGetList("listname"); SPQuery query = new ...


2

Try this : using (SPSite site = new SPSite("http:...")) { using(SPWeb web = site.OpenWeb()) { SPList oList = web.Lists.TryGetList("listname"); if(oList != null) { foreach(Field field in oList.Fields) { ...


1

Anyways here's a snippet to get a choice's value list into a list public List<string> GetInvoiceTypes(SPWeb web) { List<string> invoiceTypes = new List<string>(); SPFieldChoice invoiceTypeField = web.Fields.GetField(CustomSiteColumns.FIELD_FACTURA_TIPO) as SPFieldChoice; StringCollection choices ...



Top 50 recent answers are included