ASP.NET - How to refresh the page loading inside iframe

Asked By Lalitha Kumaran on 11-Dec-12 01:38 AM
I need to refresh the page when  switch from one tab into another tab.
If i save details in page and switched another and come back to the first page, its not refreshed.

Kindly help me to resolve this issue.

<asp:TabContainer ID="tbcSPDetails" runat="server" Style="text-align: left"
                Width="100%" CssClass="Tab" ActiveTabIndex="0" >
                <asp:TabPanel ID="tpnlSPDetails" runat="server" HeaderText="Basic Details">
                    <iframe src="spmt-TabEmployee.aspx" width="90%" height="900px" frameborder="0" ></iframe>
                <asp:TabPanel ID="tpnlVisitVisa" runat="server" HeaderText="Visit Visa">
                    <iframe src="spmt-TabVisitVisa.aspx" width="100%" height="700px" frameborder="0"></iframe>
Robbe Morris replied to Lalitha Kumaran on 11-Dec-12 10:11 AM
Yep, by default it will not reload the frame.  The most reliable way to "ensure" your iframe content gets reloaded is to set the iframe's .src property with the same url but append a querystring variable that contains a random number.  The page in the iframe can simply ignore that querystring variable.  You would do this in the Tab changed event of the Tab Control.