Author: jimdarter | Posted on: 4/27/2010 3:40:22 PM | Views : 1114

Dear All,
I'm trying to produce data from a backend SQL database on a Gridview and thus using a SQL Query to query the DB. The query uses 2 Querystring parameters and 2 Session Variables. The query runs fine until I use an IF-ELSE condition to check the input in the two Session Variables. Please find below my complete code, also I need to know if I have to Abandon the session after using the session variables?
Many thanks for your help!
</asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:Inventory_DBConnectionString9 %>"
            SelectCommand="
IF (@ILEC_Name IS NOT NULL AND @IXC_Name IS NOT NULL )
BEGIN
            SELECT *FROM [CA] ...

Go to the complete details ...