.Net - List Control (DropDownList,RadioButtonList,...) - Demo Example

我們想要以下效果:





代碼:

nsDataSet.BindListControl("stp_DDLYearType", Me.rblYearType, enDropDownListType.Other)
nsDataSet.BindListControl("stp_DDLYearType", Me.ddlYearType, enDropDownListType.All)


說明:

BindListControl是自定義Function,
只需3個parameters分別是 StoredProcedure, ListControl, 自定義選項(本例子用了其他,全部)
無論以後有什麼其他ListControl的需求, 可以很快就做好功能.

我們想要以下效果:

 

代碼:


nsDataSet.BindListControl("stp_DDLYearType", Me.rblYearType, enDropDownListType.Other)
nsDataSet.BindListControl("stp_DDLYearType", Me.ddlYearType, enDropDownListType.All)

 

說明:

BindListControl是自定義Function,
只需3個parameters分別是 StoredProcedure, ListControl, 自定義選項(本例子用了其他,全部)
無論以後有什麼其他ListControl的需求, 可以很快就做好功能.

 

 

 

------------------

熱愛生命 喜愛新奇 有趣的事物

 

過去 是無法改變
將來 卻能夠創造

 

希望使大家生活更便利
世界更美好

 

a guy who loves IT and life