Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/37.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
ASP.Net DropDownList在中继器中共享数据源_Asp.net_Performance_Datasource_Repeater - Fatal编程技术网

ASP.Net DropDownList在中继器中共享数据源

ASP.Net DropDownList在中继器中共享数据源,asp.net,performance,datasource,repeater,Asp.net,Performance,Datasource,Repeater,我有一个ASP.net中继器,它包含一个DropDownList。我想将所有DropDownList绑定到一个数据源: List<Status> statusList = QuoteRequestLogic.Instance.GetQuoteRequestStatusList(); 我知道我可以附加到中继器的ItemDataBound事件,找到DropDownList,并将其绑定到我的列表。这是最有效的方法吗?如果没有,是什么 提前谢谢 这可能是实现你想要的目标的最好方式,我认为这

我有一个ASP.net中继器,它包含一个DropDownList。我想将所有DropDownList绑定到一个数据源:

List<Status> statusList = QuoteRequestLogic.Instance.GetQuoteRequestStatusList();
我知道我可以附加到中继器的ItemDataBound事件,找到DropDownList,并将其绑定到我的列表。这是最有效的方法吗?如果没有,是什么


提前谢谢

这可能是实现你想要的目标的最好方式,我认为这是最好的方式。我唯一的建议是在页面加载时加载列表一次,存储它,然后将DDL绑定到列表。这只需要您访问数据库或数据源一次。嗯