Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
275
AJAX SQLDataSource Refresh
posted

Hello,

i have the grid bound to the SQLDataSource with a default SQL command such as SELECT * FROM Inventory with AJAX enabled. I also have a querystring request in the page load like the below code. This works for the initial page load anad data in the grid. However, when the grid does the AJAX Recrod retireve when the scrool bar reaches the bottom the data comes with no requard to price. Am i doing something wrong?

f=Request.QueryString("1")

if f ="1" then

   SELECT * FROM Invnetory WHERE PRICE > 1000

   SqlDataSource1.SelectCommand = strsql

    SqlDataSource1.DataBind()

end if

-------------------

 TIA

Tom

 

 

  • 8680
    posted

    I don't think Request.QueryString is available if you're doing an AJAX refresh.  I'd create a HiddenField inside your UpdatePanel.  Then, in your Page_Load handler, set MyHiddenField.Value = Request.QueryString("1").ToString()