So I’m trying to write some code to hide a piece of javascript in a placeholder. The idea is to hide it if it has been shown once. My code looks like this:
<asp:PlaceHolder runat="server" ID="LoadScript">
<script type="text/javascript">
javascript function
</script>
</asp:PlaceHolder>
I have an idea of using session and the visible state for the placeholder but can’t really figure out the logic. Here’s what I’m trying to work with:
Session["Script"] = LoadScript.Visible;
this.LoadScript.Visible = false;
Could someone figure out a way to make this work? Thanks!
1 Answer