March 2010 Entries

JavaScript function to Redirect parent of IFrame to specified URL

/// <summary> /// Redirects parent of IFrame to specified URL /// If current page doesn't have parent, redirect itself /// </summary> /// <param name="page"></param> /// <param name="url"></param> public static void NavigateParentToUrl(Page page, string url) { String script = @" try { var sUrl='" + url + @"'; if (self.parent.frames.length != 0) self.parent.location=sUrl; else self.location = sUrl; } catch (Exception) {} "; page.ClientScript.RegisterS... ......

«March»
SunMonTueWedThuFriSat
28123456
78910111213
14151617181920
21222324252627
28293031123
45678910