How to let end-user build different queries in several browser tabs or windows?
Last modified:
Active Query Builder let create as many QueryBuilder objects as you need. It lets use them on different pages or put several query builder on one page. To create another instance of the component each time the user needs new query builder, pass the unique string to the QueryBuilderStore.Create() method as follows:
var qb = QueryBuilderStore.Create(Guid.NewGuid().ToString());
In the previous major version 2.x it was necessary to set the MultipleQueriesPerSession directive in the "appSettings" section of 'web.config' file instructs to start building a new query each time web browser opens the page.
<appSettings>
<add key="MultipleQueriesPerSession" value="true" />
</appSettings>
This method is no longer valid in the version 3.x.
PS: Turning this property to true in the 2.x version, you should change the way you get instance of the current QueryBuilder object in AJAX requests.
You must pass the session id from the client (property httpContext.Request["sessionId"]
) to the server manually when performing AJAX requests. Having the session id you can get the right instance of the QueryBuilder using the SessionStore.GetCurrent(string sessionId)
method.