ASP.NET Code: SQL SELECT command based on DropDownList
SQL SELECT command based on DropDownList
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:dbConnectionString %>"
SelectCommand="SELECT * FROM [menu] WHERE (([region] = @region) AND ([lang] = @lang)) ORDER BY [menuId]"
<SelectParameters>
<asp:ControlParameter ControlID="DropDownList1" Name="region"
PropertyName="SelectedValue" Type="String" />
<asp:Parameter DefaultValue="1" Name="lang" Type="String" />
</SelectParameters>
2009年7月10日星期五
訂閱:
發佈留言 (Atom)
沒有留言:
發佈留言