Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Order By a drop down list item, vb.net

Status
Not open for further replies.

adamrace

Programmer
Jan 16, 2007
14
GB
Hi,

I have an access data source which produces data to put into a datalist, it all works fine but i would like to be able to "order by" from a drop down list. I am having difficulties getting the variable into the access data source. Here is the code: -
Code:
<asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="./mydb.mdb"
        SelectCommand="SELECT [room_ID], [module_ID], [day], [start_Time], [end_Time], [start_Week], [end_Week], [priority], [booking_ID], [status] FROM [requests] WHERE [module_ID] CONTAINS ? ORDER BY ?">

<SelectParameters>


    <asp:FormParameter FormField="roomName" Name="module_ID" Type="String" />
    <asp:FormParameter FormField="drop1" Type="String" />
</SelectParameters>

drop1 is the name of my drop down list, I was just wondering if anyone had any ideas or if I should approach it from a different direction?

Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top