Remember to add the usual using directives at the start of the codebehind [codesyntax lang=”csharp”] using System.Data; using System.Data.SqlClient; [/codesyntax] For a DropDownList on your ASP.NET page with an ID of Category such a [codesyntax lang=”html4strict”] <asp:DropDownList ID="Category" runat="server"> </asp:DropDownList> [/codesyntax] The following in your code behind will bind data from an example Northwind database […]
↧