How To Add Image Overlay To Embedded YouTube Videos

<div onclick="thevid=document.getElementById('thevideo'); thevid.style.display='block'; this.style.display='none'"><img src="vidthumb.jpg" style="cursor:pointer" /></div><div id="thevideo" style="display:none">

(put the YouTube embed stuff here)

</div>

File Attribute And Things To Remember

If you wanted to include another .config file within your websites web.config you can reference it as a property of

Example:

<appSettings file="appconfig\custselfserv\custselfserv.config">

Note that appconfig\custom\secretconfig.config is relative to the root of your website.

Including extra configuration files are useful for cases where you want to lock down production process ID’s and other secret settings. You can grant your production management team and IIS access to /appconfig which would conceal the settings from being read by say developers.

One thing to remember is if you change settings in this included file the IIS app pool will need to be refreshed for the changes to be picked up. web.config changes will induce an app pool refresh however included files will not automatically.

Convert Non DateTime String From One Format Into .NET DateTime

Lets say you are dealing with a mainframe system that handles Date/Time’s in this format:
2011-09-27-17.15.12.000000

You can convert this to a .NET DateTime by doing the following

dateString = "2011-09-27-17.15.12.000000";
DateTime result = DateTime.ParseExact(dateString, "yyyy-MM-dd-HH.mm.ss.ffffff", System.Globalization.DateTimeFormatInfo.CurrentInfo);