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
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.
精彩评论