Click here to Skip to main content
15,898,588 members

Comments by Member 12433411 (Top 1 by date)

Member 12433411 3-Apr-16 10:51am View    
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:Hotel1ConnectionString %>" SelectCommand="checkdate" SelectCommandType="StoredProcedure">
<SelectParameters>
<asp:ControlParameter ControlID="TextBox1" DbType="Date" Name="in" PropertyName="Text" />
</SelectParameters>

<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" DataSourceID="SqlDataSource1" DataTextField="RoomID" DataValueField="RoomID">


And here is the stored procedure:
ALTER procedure [dbo].[checkdate] @in date
as
Select distinct( RoomID) from Booking
where
@in not between CheckIn and CheckOut