I have a div that I need to hide until October 12, then have it display starting October 13. The site is being built in C# .NET so I can add an if statement to the code-behind of the HTML page. Not sure if this is possible or if I will need a jQuery solution (which I know nothing about). Any help would be appreciated.
Here is the code in the HTML:
<p style="bold">SHOW THROUGH 10/12!!!<p>
<p>Every day from now until Metastatic Breast Cancer Awareness Day (Oct. 13), a new video will be featured. Please check-in every day to hear a new story and come back on Oct. 13 to see the new, complete video wall.</p>
<div id="mbcRadioList">
<p style="bold">BUILD BUT HIDE UNTIL 10/13!!!<p>
<p><strong>Want to learn more?</strong> Select a video topic to better understand the varied experiences of people living with MBC and their family and friends.</p>
<div class="checkBoxesColumn">
<label><input name="videoWallRadio" type="radio" id="" value="" />View All</label>
<label><input name="videoWallRadio" type="radio" id="" value="" checked />My MBC Journey</label>
<label><input name="videoWallRadio" type="radio" id="" value="" />Challenges</label>
<label><input name="videoWallRadio" type="radio" id="" value="" />Positive Outlooks & Advice</label>
<label><input name="videoWallRadio" type="radio" id="" value="" />Giving Thanks</label>
<label><input name="videoWallRadio" type="radio" id="" value="" />Family / Friend Perspective</label>
</div>
</div>
I added the the <div id="mbcRadioList"> around the list to get a handle to control in the code-behind if there is a way to do this. I can remove it if it is a jQuery solution.
Thanks in advance!
Do as the other’s have suggested:
1) Set the div to
runat="server"2) Set the div to
visible="false"3) In
Page_Load, in your codebehind, add anifstatement which checks the date and then changesvisibletotrueaspx markup:
Codebehind:
As the other guys have suggested, make sure you take into consideration timezones, if required.