Hello everyone i need help. Ive been having this problem for almost a day now. dropdown list won't populate from database
Below is the code i am using:
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="PhotoAlbum.aspx.vb" Inherits="PhotoAlbum" %>
Members Of Ephesians 5:10 Photo Album!
<asp:SqlDataSource ID="categoriesDataSource" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT [CategoryID], [Name] FROM [Categories] WHERE ([UserId] = @UserId) ORDER BY [Name]">
<SelectParameters>
<asp:QueryStringParameter Name="UserId" QueryStringField="ID"/>
</SelectParameters>
</asp:SqlDataSource>
<br />
<br />
<h1 style="font-weight:bold">Filter Pictures By Category:
<asp:DropDownList ID="categories" runat="server"
AppendDataBoundItems="True"
DataSourceID="categoriesDataSource" AutoPostBack="True"
DataTextField="Name" DataValueField="CategoryID">
</asp:Content>
i need help pls