I just developed a website with the first page containing some content from the database. The website menu is one of the parts that is being generated using the data in database.
The problem is that, sometimes ( not all the times!) all the data - other than the menu - are NOT loaded and the boxes for those data are empty when I load the first page of the website. It is like only the menu is always loaded but the other parts sometimes can't load. I know it is kind of weird. It is also worth mentioning that I have this problem on both Local and remote hosts.
1) The menu is being loaded in a repeater on page load.
2) I don't think so, because sometimes everything loads without a problem, also I can see the changes I made through the administrator page I developed, so if I change the name of a link on the menu, the menu changes respectively.
Did you write the menu code yourself? If not, it usually happens that menu is not generated from the database with each page request, it is generated when the user logs in (based on the permissions he or she has) and then cached in session so that you do not have to hit the database every time. So it could be working correctly while you other page data fails to load from the database (either due to a bad connection or bugs in your code).
Yes I wrote the code myself.
And the code is very similar to the one I wrote for the news part. Both are being loaded in a repeater at page load.
The only difference I can think of, is that the menu is in the master page and the other parts are in the default page.
I'm about to start a new project that will query a database and return 6 possible combinations of result schemas and I'm trying to think of the best way to query and display the data on a single page. To clarify, there are tables in SQL that fit into one of six different schemas because we are working with six different systems that enter data into the database.
In a previous project, we were working with about 50 tables, all with the same schema. We were able to have standard queries, views and business objects. It was easy to use an objectdatasource and populate a gridview.
On this project, we want to display the data in a grid or other data control, and we only want to show the data from one table at a time. However, we aren't sure of the best approach for bringing that data into a single grid because the fields aren't consistent. Would it be a bad idea to construct a class with every possible property, use an objectdatasource and then hide and display fields in the grid? Maybe that's too outdated and there's a more modern way to handle the problem? One the other hand, I'm trying to avoid handling each schema separately. Does anybody have any suggestions of a better way? Any guidance is greatly appreciated.