A basic problem with developing web applications is that their foundation technology, html, is stateless. That means that you constantly need to jump through hoops in order to pass data from page1 to page2. Of course there are ways to solve this, such as using ASP.Net session state, querystrings, cookies, or persisting to a database. There is another way that may work for simple data if your app is hosted in a frame.
<frame src="Page1.aspx" id="mainFrame">
You could then reference this variable from your child pages via the DOM:
Very easy to implement for new apps
Scalable - as it stores data on the client, instead of on the server (like session state)
It avoids cookies, which have their own limits and problems.
It messes up your URLs, as the user only sees the URL for the host page, not the child pages. (But this may be a good thing)
It does not persist across sessions - it's only good for convenience data on the UI.
Overall, it's a cute trick for certain apps. Although, I'd rather use Silverlight if I could.
Post a Comment