Last active
December 12, 2015 03:38
-
-
Save origamirobot/4707872 to your computer and use it in GitHub Desktop.
C#
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected override void OnPreRenderComplete(EventArgs e) | |
{ | |
// LOOK FOR A SESSION VARIABLE CALLED "trail" | |
if (Session["BreadcrumbTrailThatWillClickNavigation"] != null) | |
{ | |
// SESSION CONTAINS THE VARIABLE. EXPAND MENU TO SHOW THAT TRAIL | |
String script = "hj$(document).ready(function () { oreida.SiteNav.load('" + Session["BreadcrumbTrailThatWillClickNavigation"] + "'); });"; | |
//ScriptPlaceholderBottom.Controls.Add(src); | |
HtmlGenericControl htmlScript = new HtmlGenericControl("script"); | |
htmlScript.Attributes.Add("type", "text/javascript"); | |
htmlScript.InnerHtml = string.Format("\n{0}\n", script); | |
ScriptPlaceholderBottom.Parent.Controls.Add(htmlScript); | |
// REMOVE UN NEEDED SESSION VARIABLE | |
Session.Remove("BreadcrumbTrailThatWillClickNavigation"); | |
} | |
base.OnPreRenderComplete(e); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment