Last post Mar 23, 2017 08:08 AM by Cathy Zou
Mar 22, 2017 01:33 PM|micang73|LINK
I am using webforms, asp.net, Visual Studio 2015, C#.
I have a page (aspx) that users use to select\collect a whole bunch of criteria (around 25 fields) to then pass on this criteria to an sql db to pull back results. This page has textboxes, listbox, dropdowns for the user to collect the criteria. The page
is working fine, the bit I am struggling with, is I would like that once all the textboxes, listbox, dropdowns are validated and the user is ready to view the results by clicking the search button, is to redirect to a results page - the main reason for this
is when the user clicks search, I would like to close the "criteria" page and then show a progress message while the data is retrieved on the "results" page. Getting the data into a gridview etc is working (I pass all the criteria to a parameterized stored
procedure), the bit I can't get right is to display the results to a results page. Again, the main goal here is that because some queries take a few seconds to run, I don't want the user to be able to do any clicking etc after the search button has been pressed.
It would be really appreciated if someone could share a basic example of how to do this.
FYI - I have 1 other thread related to this, but I think I was going about it the wrong way as I was trying to display the results on the same page.
Mar 23, 2017 08:08 AM|Cathy Zou|LINK
You could display loading progress image when Page loads by reference the following link:
For you problem about how to display the results to a results page:
You could follow the steps below:
i) Put the search criteria if short into query string or else add them to session variable.
ii) Now redirect to the particular page i.e. search.aspx here.
iii) Now on load of the search page get the search criteria values from query string or the session variable and do the search operation to populate the grid in the same page with the search results.