id="ddlProductCategory"
DataSourceID="srcProductCategories"
DataTextField="Name"
DataValueField="Id"
Runat="server" />
id="btnSelect"
Text="Select"
ToolTip="Select Product"
Runat="server" />
id="grdProducts"
DataSourceID="srcProducts"
Runat="server" />
id="srcProductCategories"
ConnectionString="Server=.\SQLExpress;
Trusted_Connection=True;AttachDbFileName=|DataDirectory|MyDatabase.mdf;
User Instance=True"
SelectCommand="SELECT Id,Name FROM ProductCategories"
Runat="server" />
id="srcProducts"
ConnectionString="Data Source=.\SQLExpress;
AttachDbFilename=|DataDirectory|MyDatabase.mdf;
Integrated Security=True;User Instance=True"
SelectCommand="SELECT Title,Director FROM Products
WHERE CategoryId=@Id"
Runat="server">
Name="Id"
Type="int32"
ControlID="ddlProductCategory" />