您的位置:首页 > 运维架构

Demo: Dictionary>> 泛型读取XML文件数据作为数据源(DataSource)绑定到DropDownList控件 定义个一个公用类

2008-06-30 19:36 931 查看
1true_suffix_name.DataSource = Common.OptionDictionary["suffix"];

2 true_suffix_name.DataTextField = "key";

3 true_suffix_name.DataValueField = "value";

using System;

using System.Data;

using System.Configuration;

using System.Linq;

using System.Web;

using System.Web.Security;

using System.Web.UI;

using System.Web.UI.HtmlControls;

using System.Web.UI.WebControls;

using System.Web.UI.WebControls.WebParts;

using System.Xml.Linq;

using System.IO;

using ASPSOFT.Utility;

using System.Collections.Generic;

using System.Collections;

using System.Xml;

public class Common

<?xml version="1.0" ?>

2<collect>

3 <sql item="received_by">

4 select staff_name, staff_id from staff where (staff_type='INVESTIGATOR' or staff_type='AGENT') and flag_delete=0 order by staff_name

5 </sql>

6 <sql item="municipality_code">

7 select description, code from asp_lookup where lookup_id='municipality' and varchar10='DCOUNTY' and display = 'Y' order by description

8 </sql>

9</collect>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐