Reputation: 1095
I have started creating a dashboard web application in asp.net using C#. Currently there is a page called Dashboard.aspx which does a lot of code behind IO file processing to produce and write html to an asp control on the page.
The customer has asked for another page, a different view of the dashboard. I have created another page simpleDashboard.aspx and written all of the code behind.
The problem is that the file processing needed by simpleDashboard.aspx is carried out in Dashboard.aspx. This means that files on the system are only updated when the page Dashboard.aspx is viewed in a browser (when page_load method is kicked off). As such the simpleDashboard.aspx reports out of date information - as no file processing is occurring.
Is there a way to kick off the Dashboard.aspx page_load method from simpleDashboard.aspx or have it running continuously in the background? It would probably be better to redesign the application and put the processing in a separate class file, but I'm not keen on doing that as it would be a lot of work to seperate and re-write all the html writing and IO processing.
Upvotes: 0
Views: 1106
Reputation: 2075
Yes, it is possible.
The quick and dirty way of doing this is to use an iframe. Put something like this in your simpleDashboard.aspx
<div id="map" style="display:block; visibility:hidden">
<iframe src="Dashboard.aspx" height="300px" width=" 100%" ></iframe>
</div>
The correct way to do this, of course you already know the answer is to separate the logic from Dashboard.aspx
into a separated file and call it from simpleDashboard.aspx
Upvotes: 1