zoukankan      html  css  js  c++  java
  • 如何将sharepoint列表中choice类型的值绑定到dropdownlist上

      using (SPSite site=new SPSite(siteurl))
                {
                    using(SPWeb web=site.OpenWeb())
                    {
                        try
                        {
                            SPList list = web.Lists["ServiecesInfo"];
                            SPFieldChoice spcustomerlocation = new SPFieldChoice(list.Fields, "CustomerLocation");
                             for (int i = 0; i < spcustomerlocation.Choices.Count; i++)
                            {
                                ddlCustomLocation.Items.Add(new ListItem(spcustomerlocation.Choices[i].ToString(), i.ToString()));
                            }             
                        }
                        catch (Exception ex)
                        {
                            throw new Exception(ex.Message);
                        }
                    }
                }
  • 相关阅读:
    linux的性能优化
    linux日志分析
    rsyslog日志服务的配置文件分析
    Unix 入门
    Linux常用快捷键
    Linux常用命令大全
    ueditor 实现ctrl+v粘贴图片并上传、word粘贴带图片
    本地图文直接复制到WordPress编辑器中
    本地图文直接复制到Blog编辑器中
    http大文件上传(切片)
  • 原文地址:https://www.cnblogs.com/KingStar/p/1582727.html
Copyright © 2011-2022 走看看