On my aspx page, I have a tab control.
In each tab I am loading an Iframe with URL. This Iframe URL is stored in a db table.
Each tab has its own Iframe.
Tabs are generated dynamically by reading a data in a table.
When focus is on Iframe and user presses back button, it tries to load previous url in Iframe and gives 404 error.
How can I handle this backspace button case?
Same thing happens when user click browser back button.
I tried capturing KeyCode on keydown event in javascript and set window.location.href to the same page.
This works well on parent page. But when focus is on tab content, I dont have any control over there.
Also for my parent page, I am disabling cache on Page Init event by
protected void Page_Init(object Sender, EventArgs e)
{
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetExpires(DateTime.Now.AddSeconds(-1));
Response.Cache.SetNoStore();
}
Is there any way to handle these two scenarios?