Let\'s say I have two pages on the same ASP.NET C# WebSite.
I had the same problem and found that this works for me: (add this on the Page_Load section)
if (this.Master.Page.Header != null && Session["RELOAD"] == null)
{
System.Web.UI.HtmlControls.HtmlHead hh = this.Master.Page.Header;
System.Web.UI.HtmlControls.HtmlMeta hm = new System.Web.UI.HtmlControls.HtmlMeta();
hm.Attributes.Add("http-equiv", "Refresh");
hm.Attributes.Add("content", "3");
hh.Controls.Add(hm);
}
and then I add Session["RELOAD"] = "1" right after it executes the code I want to run to prevent it from refreshing over and over again. Works like a charm.