Last post Jun 03, 2015 11:30 PM by Edwin Guru Singh
Jun 03, 2015 05:33 AM|Madluka|LINK
Hi, I am starting to re-acquaint myself with a little web development work having years ago doing simple ado recordset and paging type simple web apps. I am looking at creating a dashboard page that contains several lists, charts and single values generated
by querying a SQL database - nothing out of the ordinary I am sure. I have managed to set the connection string info in the web.config and using this to establish a connection to SQL and pull back a value as a result of a select count(*) query into the page
successfully. I am very comfortable with SQL, so no problems there with queries, however I would like some guidance on what is the best practice/most efficient way of making multiple calls (potentially up to 20 queries per page) using ASP.NET to populate
I apologise in advance if I am not articulating things so well, but should I simply let the ASP.NET page process queries as it renders each chart/list in sequence (which seems quite old-skool/heavy workload) or throw all queries for data into code that runs
on form load and put the data into arrays etc. to be read by the page when it renders charts etc.? If we consider a dashboard which has multiple charts and executes multiple queries, how best to handle refreshing these charts periodically (minutes) without
rendering the whole page again, is that possible?
I've come across information on something called JSON which apparently has some neat tricks when querying to save on rendering time when data hasn't changed - is this a thing I should be looking at?
Thanks for any advice or useful links!
Jun 03, 2015 11:30 PM|Edwin Guru Singh|LINK
Thanks for your post.
As per this case, check the following details :
1.You can apply master -child page for separating the dashboard & other contents
2.Also need to use AJAX ScriptManager with partial page rendering technique & apply updatepanel control or some other method like jQuery for refresh the page rendering partially.
3.If you are not using AJAX update panel then use HTML meta tag which helps to refresh the page periodically by pre-defined interval like below :
<meta http-equiv="refresh" content="30">
<meta http-equiv="refresh" content="30;url=Webform1.aspx">
4.For retrieving corresponding data from database, use parameterized query or stored procedure.
5.After retrieved data from database & keep it in session(server-side) or viewstate(client-side) based on your requirements if its not dynamic.
Click here to refer about Different methods to reload/refresh page using jquery