Author: stinkyjak | Posted on: 7/10/2009 5:09:12 AM | Views : 251

I need a way validate dropdown item is not already in the database. If I could get a row count or something that would great.


I have an sqlDataSource, but I just don't know how to run it without tying it to a form or gridview or what not... and how to detirming how many rows are affected/returned.




<asp:SqlDataSource ID="CheckSummaryDate_SQL_DS" runat="server"
        ConnectionString="<%$ ConnectionStrings:MyConnectionString %>"
        SelectCommand="SELECT SummaryID, ProjectID, Summary, SummaryDate FROM MonthlySummary WHERE (ProjectID = @ProjectID) AND (DATEPART(MM, SummaryDate) = @ddlMonth) AND (DATEPART(yyyy, SummaryDate) = @ddlYear)">
        <SelectParameters>
            <asp:Control ...

Go to the complete details ...