开发者

Please help.How can I get the stored procedure I have created at SQL Server Management Studio using ASP.NET with VB.NET Code behind the files

开发者 https://www.devze.com 2023-03-25 02:52 出处:网络
How can I get the output开发者_JS百科 data of sql procedure from SQL Server to my asp.net[vb.net] page dropdown list?<asp:DropDownList ID=\"DdLocation\"></asp:DropDownList>Get the data fro

How can I get the output开发者_JS百科 data of sql procedure from SQL Server to my asp.net[vb.net] page dropdown list?<asp:DropDownList ID="DdLocation"></asp:DropDownList>


Get the data from SQL to either a dataset or a datatable: http://www.google.com/search?q=vb.net+get+data+from+sql+server+to+dataset

Then on the DdLocation_Load, or Page_Load event, bind the data:

DdLocation.DataSource = location_data
DdLocation.DataTextField = "LocationDesc"
DdLocation.DataValueField = "LocationID"
DdLocation.DataBind()

Once you call DataBind, the data will be attached to the drop down list.

0

精彩评论

暂无评论...
验证码 换一张
取 消