<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>Try MySite.GetContent() Catch(Useless Info) Finally Site.Close() End Try</title>
        <link>http://weblogs.sqlteam.com/jhermiz/Default.aspx</link>
        <description>The guide to programming and analyzing SQL, .NET, and SAP</description>
        <language>en-US</language>
        <copyright>Jon Hermiz</copyright>
        <generator>Subtext Version 2.5.1.0</generator>
        <image>
            <title>Try MySite.GetContent() Catch(Useless Info) Finally Site.Close() End Try</title>
            <url>http://weblogs.sqlteam.com/images/RSS2Image.gif</url>
            <link>http://weblogs.sqlteam.com/jhermiz/Default.aspx</link>
            <width>77</width>
            <height>60</height>
        </image>
        <item>
            <title>How to add TinyMCE into ASP.net web form.</title>
            <category>.NET</category>
            <category>TinyMCE</category>
            <link>http://weblogs.sqlteam.com/jhermiz/archive/2009/11/17/How-to-add-TinyMCE-into-ASP.net-web-form.aspx</link>
            <description>&lt;p&gt;Recently I needed a WYSIWYG editor in my asp.net web form.  I looked at various ones including WMD Editor (which I &lt;br /&gt;
know is not exactly a WYSIWYG editor, there site states 'It just wasn't built for WYSIWYG. So WMD is something new:&lt;br /&gt;
a &lt;em&gt;Wysiwym Markdown&lt;/em&gt; editor').  The support is lacking and from the looks of it the API is too.  Lastly, I've seen a lot of sites&lt;br /&gt;
using WMD Editor but the visitors on that site certainly don't care about a 'Markdown editor'.  End users try to manipulate&lt;br /&gt;
the formatting down to WYSIWYG so why bother?  Look at the comments in this &lt;a target="_blank" href="http://www.codinghorror.com/blog/archives/001306.html"&gt;post&lt;/a&gt; from stackoverflow if you don't believe me.&lt;br /&gt;
  As much as the creators of the site want users to read and listen a user's intuition and what they want to accomplish is more important.&lt;br /&gt;
  So why bother?  You code applications for people who plan to use it.  You just don't code it simply because you think it's right.&lt;/p&gt;
&lt;p&gt;Usability is a topic on its own, lets focus on getting &lt;a target="_blank" href="http://tinymce.moxiecode.com/"&gt;TinyMCE&lt;/a&gt; working inside of an ASP.net web project.  &lt;/p&gt;
&lt;font size="4"&gt;
&lt;h3&gt;&lt;font size="4"&gt;Getting TinyMCE&lt;/font&gt;&lt;/h3&gt;
&lt;/font&gt;
&lt;p&gt;1. Download the development package of TinyMCE &lt;a target="_blank" href="http://tinymce.moxiecode.com/download.php"&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;2. You'll get a folder structure starting at "tinymce" for now leave that in some temporary place (your desktop or c:\temp)&lt;/p&gt;
&lt;h3&gt;Copying TinyMCE Into Visual Studio&lt;/h3&gt;
&lt;p&gt;1. Fire up visual studio (this has been tested on 2005, 2008)&lt;/p&gt;
&lt;p&gt;2. File-&amp;gt;New-&amp;gt;Web Site&lt;/p&gt;
&lt;p&gt;3. Select ASP.NET Web Site for the language select C# (if you are more comfortable with VB then select Visual Basic)&lt;/p&gt;
&lt;p&gt;4. Remember that tinymce folder you had saved temporarily, well it's time to drag and drop that folder into this project.&lt;/p&gt;
&lt;p&gt;The result of that looks like this:&lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="http://img163.imageshack.us/img163/1207/tinymce.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;tinyMCE has an init() function which initalizes the mode, the theme, the various &lt;/p&gt;
&lt;p&gt;buttons within the toolbars and so on.  So inside of your default.aspx go to the &lt;/p&gt;
&lt;p&gt;source code and add the following javascript:&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;script&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;type&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;="text/javascript"&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;src&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;="tinymce/jscripts/tiny_mce/tiny_mce.js"&amp;gt;&amp;lt;/&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;script&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;script&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;type&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;="text/javascript"&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;tinyMCE.init({&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;"textareas"&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;,&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;"advanced"&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;,&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;"safari,pagebreak,style,layer,table,save,advhr,&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;template"&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;,&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;"save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;,justifyfull,styleselect,formatselect,fontselect,fontsizeselect"&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;,&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;"cut,copy,paste,pastetext,&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor"&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;,&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;"tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;|,print,|,ltr,rtl,|,fullscreen"&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;,&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;"insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak"&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;,&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;"top"&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;,&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;"left"&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;,&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;"bottom"&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;,&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;true&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;,&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;"css/content.css"&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;,&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;"lists/template_list.js"&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;,&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;"lists/link_list.js"&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;,&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;"lists/image_list.js"&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;,&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;"lists/media_list.js"&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;,&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;"Some User"&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;,&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;"991234"&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;script&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;// General options&lt;/p&gt;
&lt;p&gt;mode : &lt;/p&gt;
&lt;p&gt;theme : &lt;/p&gt;
&lt;p&gt;plugins : &lt;/p&gt;
&lt;p&gt;// Theme options&lt;/p&gt;
&lt;p&gt;theme_advanced_buttons1 : &lt;/p&gt;
&lt;p&gt;theme_advanced_buttons2 : &lt;/p&gt;
&lt;p&gt;theme_advanced_buttons3 : &lt;/p&gt;
&lt;p&gt;theme_advanced_buttons4 : &lt;/p&gt;
&lt;p&gt;theme_advanced_toolbar_location : &lt;/p&gt;
&lt;p&gt;theme_advanced_toolbar_align : &lt;/p&gt;
&lt;p&gt;theme_advanced_statusbar_location : &lt;/p&gt;
&lt;p&gt;theme_advanced_resizing : &lt;/p&gt;
&lt;p&gt;// Example content CSS (should be your site CSS)&lt;/p&gt;
&lt;p&gt;content_css : &lt;/p&gt;
&lt;p&gt;// Drop lists for link/image/media/template dialogs&lt;/p&gt;
&lt;p&gt;template_external_list_url : &lt;/p&gt;
&lt;p&gt;external_link_list_url : &lt;/p&gt;
&lt;p&gt;external_image_list_url : &lt;/p&gt;
&lt;p&gt;media_external_list_url : &lt;/p&gt;
&lt;p&gt;// Replace values for the template plugin&lt;/p&gt;
&lt;p&gt;template_replace_values : {&lt;/p&gt;
&lt;p&gt;username : &lt;/p&gt;
&lt;p&gt;staffid : &lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;});&lt;/p&gt;
&lt;p&gt;&amp;lt;/&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;font size="+0"&gt;You'll want to make sure you insert this inside of your &amp;lt;head&amp;gt; &amp;lt;/head&amp;gt; section.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;h4&gt;Inserting the TinyMCE textarea field&lt;/h4&gt;
&lt;p&gt;You're almost done all that is left is too add a textarea inside of your default.aspx page.  Something to this effect:&lt;/p&gt;
&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;
&lt;p&gt;&amp;lt;&lt;/p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;form&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;id&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;="form1"&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;runat&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;="server"&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt; &lt;/p&gt;
&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;div&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&amp;lt;&lt;/p&gt;
&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;textarea&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;id&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;="elm1"&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;name&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;="elm1"&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;rows&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;="15"&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;cols&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;="80"&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;style&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;="width: 80%"&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;runat&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;="server"&amp;gt;&amp;lt;/&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;textarea&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;br&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;/&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt; &lt;/p&gt;
&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;asp&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;:&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;Button&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;ID&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;="Button1"&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;runat&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;="server"&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;Text&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;="Button"&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;OnClick&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;="Button1_Click"&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;/&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt; &lt;/p&gt;
&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;/&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;div&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt; &lt;/p&gt;
&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;/&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;form&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;/font&gt;
&lt;h4&gt;When I try to preview or get the data ASP.net complains&lt;/h4&gt;
&lt;em&gt;A potentially dangerous Request.Form value was detected from the client (elm1="&amp;lt;p&amp;gt;fdsfsdfdsad&amp;lt;/p&amp;gt;").&lt;/em&gt;
&lt;p&gt;To fix this go back to the source (html) code of your default.aspx page.  You will see a page directive like so:&lt;/p&gt;
&lt;p&gt; &lt;font size="2"&gt;&amp;lt;%&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;@&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;Page&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;Language&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;="C#"&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;AutoEventWireup&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;="true"&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;CodeFile&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;="Default.aspx.cs"&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;Inherits&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;="_Default"&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; %&amp;gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;Change it to this:&lt;/font&gt;&lt;/p&gt;
&lt;font size="2"&gt;&lt;font size="2"&gt;
&lt;p&gt;&amp;lt;%&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;We've simply added ValidateRequest="false" in the page directive.&lt;/font&gt;&lt;/p&gt;
&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;@&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;Page&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;Language&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;="C#"&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;AutoEventWireup&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;="true"&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;CodeFile&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;="Default.aspx.cs"&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;Inherits&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;="_Default"&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;ValidateRequest&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;="false"&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;%&amp;gt;&lt;/font&gt;&lt;/font&gt;
&lt;h4&gt;How it ends up looking&lt;/h4&gt;
&lt;p&gt;If you've done everything correctly you should end up seeing a form like so:&lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="http://img695.imageshack.us/img695/2434/tinymce2.jpg" /&gt;&lt;/p&gt;
&lt;h4&gt;But WMD Editor I can get a quick preview with one line of code&lt;/h4&gt;
&lt;p&gt;No problem you can do that with TinyMCE as well.  Remember the init() function we talked &lt;/p&gt;
&lt;p&gt;about in the head section of your html.  Those control themes, buttons on the toolbars etc. &lt;/p&gt;
&lt;p&gt;etc.  Well simply add the Preview button to one of the toolbars.&lt;/p&gt;
&lt;p&gt;For instance, we had the following:&lt;/p&gt;
&lt;font size="2"&gt;
&lt;p&gt;theme_advanced_buttons1 : &lt;/p&gt;
&lt;font size="2"&gt;
&lt;p&gt;theme_advanced_buttons1 : &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect"&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;,&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;for one of the Theme options..simply add preview before say save so that the above becomes:&lt;/font&gt;&lt;/p&gt;
&lt;font size="2"&gt;&lt;font size="2"&gt;
&lt;p&gt;theme_advanced_buttons1 : &lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;Now this will create a preview button in the toolbar right next to the save button.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect"&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;,&lt;/font&gt;&lt;/p&gt;
&lt;h4&gt;So how do I get data or the text / formatting from the textarea box&lt;/h4&gt;
&lt;p&gt;Simple, it is runat=server so we have access to it via server side code.&lt;/p&gt;
&lt;p&gt;Something like this behind the click event of a button&lt;/p&gt;
&lt;p&gt;Response.Write(this.elm1.Value); &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;"preview,save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt; &lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;"save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;img src="http://weblogs.sqlteam.com/jhermiz/aggbug/61055.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Jon Hermiz</dc:creator>
            <guid>http://weblogs.sqlteam.com/jhermiz/archive/2009/11/17/How-to-add-TinyMCE-into-ASP.net-web-form.aspx</guid>
            <pubDate>Tue, 17 Nov 2009 18:01:22 GMT</pubDate>
            <comments>http://weblogs.sqlteam.com/jhermiz/archive/2009/11/17/How-to-add-TinyMCE-into-ASP.net-web-form.aspx#feedback</comments>
            <slash:comments>7</slash:comments>
            <wfw:commentRss>http://weblogs.sqlteam.com/jhermiz/comments/commentRss/61055.aspx</wfw:commentRss>
        </item>
        <item>
            <title>How To Set Default Dates In Reporting Services</title>
            <category>Reporting Services</category>
            <category>SQL Server</category>
            <link>http://weblogs.sqlteam.com/jhermiz/archive/2008/03/26/How-To-Set-Default-Dates-In-Reporting-Services.aspx</link>
            <description>&lt;p&gt;I posted this in the SQL Team forum: &lt;font face="Arial"&gt;&lt;a href="http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=99696"&gt;http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=99696&lt;/a&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;It shows you a good way of creating a bunch of date functions so that you can use them in reporting services as date default values for any date parameter.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;&lt;img src="http://weblogs.sqlteam.com/jhermiz/aggbug/60555.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Jon Hermiz</dc:creator>
            <guid>http://weblogs.sqlteam.com/jhermiz/archive/2008/03/26/How-To-Set-Default-Dates-In-Reporting-Services.aspx</guid>
            <pubDate>Wed, 26 Mar 2008 15:53:10 GMT</pubDate>
            <comments>http://weblogs.sqlteam.com/jhermiz/archive/2008/03/26/How-To-Set-Default-Dates-In-Reporting-Services.aspx#feedback</comments>
            <slash:comments>4</slash:comments>
            <wfw:commentRss>http://weblogs.sqlteam.com/jhermiz/comments/commentRss/60555.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Just Hillarious!</title>
            <category>Other</category>
            <link>http://weblogs.sqlteam.com/jhermiz/archive/2007/12/20/Just-Hillarious.aspx</link>
            <description>&lt;p&gt;I cant stop laughing, and neither will you!  Play the video below, this reminds me of the 80s!&lt;/p&gt;
&lt;p&gt;&lt;embed src="http://www.youtube.com/v/oHg5SJYRHA0&amp;amp;rel=1" width="425" height="355" type="application/x-shockwave-flash" wmode="transparent"&gt;&lt;/embed&gt;&lt;/p&gt;&lt;img src="http://weblogs.sqlteam.com/jhermiz/aggbug/60441.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Jon Hermiz</dc:creator>
            <guid>http://weblogs.sqlteam.com/jhermiz/archive/2007/12/20/Just-Hillarious.aspx</guid>
            <pubDate>Thu, 20 Dec 2007 18:54:33 GMT</pubDate>
            <comments>http://weblogs.sqlteam.com/jhermiz/archive/2007/12/20/Just-Hillarious.aspx#feedback</comments>
            <slash:comments>4</slash:comments>
            <wfw:commentRss>http://weblogs.sqlteam.com/jhermiz/comments/commentRss/60441.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Asking For A Raise</title>
            <category>Other</category>
            <link>http://weblogs.sqlteam.com/jhermiz/archive/2007/12/19/Asking-For-A-Raise.aspx</link>
            <description>&lt;p&gt;Its that time of year when many people have a big decision to make:&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;Go with the flow and take whatever your corporation gives you. &lt;/li&gt;
    &lt;li&gt;Ask for a raise &lt;/li&gt;
    &lt;li&gt;Forget about it..change careers cause you just aren't going anywhere or getting anything &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It really is a tough decision to make when it involves more money.  We started a post over at sqlteam about this over here: &lt;font face="Arial"&gt;&lt;a href="http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=94258"&gt;http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=94258&lt;/a&gt;.  Some very interesting comments so first check those out before you read on.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Dont Blow It&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;One thing you need to remember is this is probably your one and only chance for the year to get a raise so dont&lt;strong&gt; blow it&lt;/strong&gt;.  Here are some do nots to follow:&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;Do not ask for a raise without being prepared.  So many people just want more money but have no documentation or support as to why they deserve the pay raise. &lt;/li&gt;
    &lt;li&gt;Do not mention that you've purchased a new vehicle and your bills have increased, your car has nothing to do with the company. &lt;/li&gt;
    &lt;li&gt;Do not tell them you have a new baby on the way / have existing kids at home and that you need the pay to help with costs around the house. &lt;/li&gt;
    &lt;li&gt;Don't even bother telling them about any bills including mortgage bills that you need to pay off...again no one in the company cares about your problems &lt;/li&gt;
    &lt;li&gt;Do not argue, if they make you mad be professional and ask questions.  Find out why they cant, find how how to improve your current skill set to be reconsidered...always ASK ASK ASK. &lt;/li&gt;
    &lt;li&gt;Do not force them or tell them that you will look else where.  Even if you do look else where keep it to yourself.  Dont bother threatning them or it could back fire. &lt;/li&gt;
    &lt;li&gt;Don't cry and definately do not YELL.  Yelling is verbal abuse and you will be repremanded for this.  Be careful... &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Do Your Homework&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This is your chance to finally get a raise, so what's the best way to do it?  Well first of all just like anything you have to be well prepared, organized, and review the work you've done in the past, present, and the future.  Do not walk into this meeting (when you have your review) with no paper and no pen.  Print out emails, bring your portfolio of work you've done or supported.  No one that I know is just going to hand you over some extra money just for being you.&lt;/p&gt;
&lt;p&gt;Here are some Do's in getting a raise:&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;Prepare yourself by printing e-mails from end users, or customers who enjoy your work or your personality (business only nothing outside of work). &lt;/li&gt;
    &lt;li&gt;Have a list of questions ready in case they close the meeting with "Do you have any questions". &lt;/li&gt;
    &lt;li&gt;Don't just take No for a final answer.  Ask questions why, or what you could do better next time. &lt;/li&gt;
    &lt;li&gt;Be professional, use eye contact, sit up straight.  I know review time can get a little boring but its worth the sacrifice if it means an extra 5-10 thousand (not a bad raise). &lt;/li&gt;
    &lt;li&gt;Listen to your manager's opinions and understand where he / she is coming from. &lt;/li&gt;
    &lt;li&gt;If you don't agree on something, do NOT get mad simply ask questions and understand that this should be something that you care about. &lt;/li&gt;
    &lt;li&gt;Be on time (I know people who have not even shown up on their review day). &lt;/li&gt;
    &lt;li&gt;Show off but DO NOT BE COCKY.  Don't try to be arrogant in your approach but definately show them the great things you've done for the company. &lt;/li&gt;
    &lt;li&gt;Get advice from people who have been in the industry longer than you. &lt;/li&gt;
    &lt;li&gt;Check out the job market, find out what people are paying for skills which you have. &lt;/li&gt;
    &lt;li&gt;List out your accomplishments and talk about your future with the company. &lt;/li&gt;
    &lt;li&gt;Be positive, and sincere, show them that you truly care &lt;/li&gt;
    &lt;li&gt;Always always ask for a time frame or a date when you think your manager can get back to you if he / she does contemplate a raise.  If you don't get a date it probably means you won't get a raise or at least you won't get one any time soon. &lt;/li&gt;
    &lt;li&gt;Leave your managers office with a good impression.  You want your manager to think "Wow...I really need this guy / gal in our functional group" &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;One thing I got from my previous boss that I'll share with you is something to think about:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;"Basically there are 3 roles, support, part of the product, and the product.  In the support role your work is not very scaleable, whereas if your work was the product it would be very scaleable.  The salary you can command is always going to be proportional to the scaleability of your work.  You need to take this into consideration when you compare salaries.So doing the same work is worth more as it becomes more scaleable. You have to decide the role you want your work to  be in."&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;If you have additional tips or pointers definately share them.&lt;/p&gt;&lt;img src="http://weblogs.sqlteam.com/jhermiz/aggbug/60438.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Jon Hermiz</dc:creator>
            <guid>http://weblogs.sqlteam.com/jhermiz/archive/2007/12/19/Asking-For-A-Raise.aspx</guid>
            <pubDate>Wed, 19 Dec 2007 19:16:49 GMT</pubDate>
            <comments>http://weblogs.sqlteam.com/jhermiz/archive/2007/12/19/Asking-For-A-Raise.aspx#feedback</comments>
            <wfw:commentRss>http://weblogs.sqlteam.com/jhermiz/comments/commentRss/60438.aspx</wfw:commentRss>
        </item>
        <item>
            <title>What If: The Dream Company</title>
            <category>Other</category>
            <link>http://weblogs.sqlteam.com/jhermiz/archive/2007/12/17/What-If-The-Dream-Company.aspx</link>
            <description>&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 11pt"&gt;What If : The Dream Company&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt; &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 11pt"&gt;Ever wonder what if when it comes to your imaginary corporation where you have an unlimited amount of money to spend on talent?&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt; &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 11pt"&gt;What if...&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt; &lt;/div&gt;
&lt;ul style="MARGIN-TOP: 0in" type="disc"&gt;
    &lt;li style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 11pt"&gt;Tara&lt;/span&gt;&lt;span style="FONT-SIZE: 11pt"&gt; was my dba yelling at my programmers to ensure their SQL is solid. Backing up the databases and restoring them like no other. Ensuring my databases were running smoothly and fully optimized&lt;/span&gt;
    &lt;ul style="MARGIN-TOP: 0in" type="circle"&gt;
        &lt;li style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 11pt"&gt;See this &lt;a href="http://weblogs.sqlteam.com/tarad/archive/2007/11.aspx"&gt;&lt;font color="#800080"&gt;http://weblogs.sqlteam.com/tarad/archive/2007/11.aspx&lt;/font&gt;&lt;/a&gt;&lt;/span&gt; &lt;/li&gt;
        &lt;li style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 11pt"&gt;What about this &lt;a href="http://weblogs.sqlteam.com/tarad/archive/2007/02.aspx"&gt;&lt;font color="#800080"&gt;http://weblogs.sqlteam.com/tarad/archive/2007/02.aspx&lt;/font&gt;&lt;/a&gt;&lt;/span&gt; &lt;/li&gt;
    &lt;/ul&gt;
    &lt;/li&gt;
&lt;/ul&gt;
&lt;div style="MARGIN: 0in 0in 0pt 0.75in"&gt; &lt;/div&gt;
&lt;ul style="MARGIN-TOP: 0in" type="disc"&gt;
    &lt;li style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 11pt"&gt;Jeff was smacking the junior developers around discussing how they should organize their code. HANDLE THAT AT THE FRONT END I TOLD YOU!! WHAT…you placed that in the db code…NO NO NO…this formatting should be done on the front end!&lt;/span&gt;
    &lt;ul style="MARGIN-TOP: 0in" type="circle"&gt;
        &lt;li style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 11pt"&gt;See this &lt;a href="http://weblogs.sqlteam.com/jeffs/category/238.aspx"&gt;&lt;font color="#800080"&gt;http://weblogs.sqlteam.com/jeffs/category/238.aspx&lt;/font&gt;&lt;/a&gt;&lt;/span&gt; &lt;/li&gt;
        &lt;li style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 11pt"&gt;And this… &lt;a href="http://weblogs.sqlteam.com/jeffs/archive/2007/08.aspx"&gt;&lt;font color="#800080"&gt;http://weblogs.sqlteam.com/jeffs/archive/2007/08.aspx&lt;/font&gt;&lt;/a&gt;&lt;/span&gt; &lt;/li&gt;
        &lt;li style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 11pt"&gt;And especially this &lt;a href="http://weblogs.sqlteam.com/jeffs/archive/2007/07.aspx"&gt;&lt;font color="#800080"&gt;http://weblogs.sqlteam.com/jeffs/archive/2007/07.aspx&lt;/font&gt;&lt;/a&gt;&lt;/span&gt; &lt;/li&gt;
    &lt;/ul&gt;
    &lt;/li&gt;
&lt;/ul&gt;
&lt;div style="MARGIN: 0in 0in 0pt 0.75in"&gt; &lt;/div&gt;
&lt;ul style="MARGIN-TOP: 0in" type="disc"&gt;
    &lt;li style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 11pt"&gt;Peso (Peter) was taking care of the other SQL developers and ensuring their code was clean, short, and optimized. Boy can that guy come up with great SQL. He’d also be the one to entertain all the new comers with SQL classes and how to truly understand the tools. We’d call him the gate keeper, and he’d be in charge of telling us whose fit for the corporation!&lt;/span&gt;
    &lt;ul style="MARGIN-TOP: 0in" type="circle"&gt;
        &lt;li style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 11pt"&gt;See here &lt;a href="http://weblogs.sqlteam.com/peterl/archive/2007/12/10/Cursor-is-really-faster-than-set-based-solution.aspx"&gt;&lt;font color="#800080"&gt;http://weblogs.sqlteam.com/peterl/archive/2007/12/10/Cursor-is-really-faster-than-set-based-solution.aspx&lt;/font&gt;&lt;/a&gt;&lt;/span&gt; &lt;/li&gt;
        &lt;li style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 11pt"&gt;Here… &lt;a href="http://weblogs.sqlteam.com/peterl/archive/2007/09/27/Clever-way-to-get-the-records-you-want-with-certain.aspx"&gt;&lt;font color="#800080"&gt;http://weblogs.sqlteam.com/peterl/archive/2007/09/27/Clever-way-to-get-the-records-you-want-with-certain.aspx&lt;/font&gt;&lt;/a&gt;&lt;/span&gt; &lt;/li&gt;
    &lt;/ul&gt;
    &lt;/li&gt;
&lt;/ul&gt;
&lt;div style="MARGIN: 0in 0in 0pt 0.75in"&gt; &lt;/div&gt;
&lt;ul style="MARGIN-TOP: 0in" type="disc"&gt;
    &lt;li style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 11pt"&gt;Spirit (Mladen) was in charge of discovering new tools, testing, and preaching to the developers. HOW CAN YOU BE DOING THIS WITHOUT A DATABASE TIER!!! Who told you object orientated programming was that difficult? What do you mean you haven’t used the newly designed data extractor object that I invented!&lt;/span&gt;
    &lt;ul style="MARGIN-TOP: 0in" type="circle"&gt;
        &lt;li style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 11pt"&gt;See here &lt;a href="http://weblogs.sqlteam.com/mladenp/archive/2007/10/18/SQL-Server-Filtering-Numeric-data-from-a-character-based-column.aspx"&gt;&lt;font color="#800080"&gt;http://weblogs.sqlteam.com/mladenp/archive/2007/10/18/SQL-Server-Filtering-Numeric-data-from-a-character-based-column.aspx&lt;/font&gt;&lt;/a&gt;&lt;/span&gt; &lt;/li&gt;
        &lt;li style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 11pt"&gt;&lt;a href="http://weblogs.sqlteam.com/mladenp/archive/2007/09/24/.Net-Passing-user-data-with-Exception-back-to-the-caller.aspx"&gt;&lt;font color="#800080"&gt;http://weblogs.sqlteam.com/mladenp/archive/2007/09/24/.Net-Passing-user-data-with-Exception-back-to-the-caller.aspx&lt;/font&gt;&lt;/a&gt;&lt;/span&gt; &lt;/li&gt;
        &lt;li style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 11pt"&gt;And many more interesting articles here &lt;a href="http://weblogs.sqlteam.com/mladenp/"&gt;&lt;font color="#800080"&gt;http://weblogs.sqlteam.com/mladenp/&lt;/font&gt;&lt;/a&gt;&lt;/span&gt; &lt;/li&gt;
    &lt;/ul&gt;
    &lt;/li&gt;
&lt;/ul&gt;
&lt;div style="MARGIN: 0in 0in 0pt 0.75in"&gt; &lt;/div&gt;
&lt;ul style="MARGIN-TOP: 0in" type="disc"&gt;
    &lt;li style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 11pt"&gt;Brett was handling all of the dirty work including conversions from one system to another. Porting code over to different database vendors, writing T-SQL, and bumping heads with the front end folks for not listening to him in the first place!&lt;/span&gt;
    &lt;ul style="MARGIN-TOP: 0in" type="circle"&gt;
        &lt;li style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 11pt"&gt;&lt;a href="http://weblogs.sqlteam.com/brettk/archive/2007/03/01/60124.aspx"&gt;&lt;font color="#800080"&gt;http://weblogs.sqlteam.com/brettk/archive/2007/03/01/60124.aspx&lt;/font&gt;&lt;/a&gt;&lt;/span&gt; &lt;/li&gt;
        &lt;li style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 11pt"&gt;How about this &lt;a href="http://weblogs.sqlteam.com/brettk/archive/2007/07/26/60272.aspx"&gt;&lt;font color="#800080"&gt;http://weblogs.sqlteam.com/brettk/archive/2007/07/26/60272.aspx&lt;/font&gt;&lt;/a&gt;&lt;/span&gt; &lt;/li&gt;
        &lt;li style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 11pt"&gt;Plenty more here… &lt;a href="http://weblogs.sqlteam.com/brettk/"&gt;&lt;font color="#800080"&gt;http://weblogs.sqlteam.com/brettk/&lt;/font&gt;&lt;/a&gt;&lt;/span&gt; &lt;/li&gt;
    &lt;/ul&gt;
    &lt;/li&gt;
&lt;/ul&gt;
&lt;div style="MARGIN: 0in 0in 0pt 0.75in"&gt; &lt;/div&gt;
&lt;ul style="MARGIN-TOP: 0in" type="disc"&gt;
    &lt;li style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 11pt"&gt;MVJ (Michal Valentine Jones…not sure if that is really his name) he’d be in charge of the final base code. Would be willing to give him a duplicate gate keeper key much like that of Peso’s. He’s the go to guy, the man with an answer to much anything when it comes to SQL. He’d come up with weird functions that handle dates…reusable code…ya the weird stuff that just seems to work!&lt;/span&gt;
    &lt;ul style="MARGIN-TOP: 0in" type="circle"&gt;
        &lt;li style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 11pt"&gt;Definitely see here:  &lt;a href="http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=61519"&gt;&lt;font color="#800080"&gt;http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=61519&lt;/font&gt;&lt;/a&gt; (it helped me a LOT)&lt;/span&gt; &lt;/li&gt;
    &lt;/ul&gt;
    &lt;/li&gt;
&lt;/ul&gt;
&lt;div style="MARGIN: 0in 0in 0pt 0.75in"&gt; &lt;/div&gt;
&lt;ul style="MARGIN-TOP: 0in" type="disc"&gt;
    &lt;li style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 11pt"&gt;Kristen (&lt;a href="http://www.sqlteam.com/forums/pop_profile.asp?mode=display&amp;amp;id=10539"&gt;&lt;font color="#800080"&gt;http://www.sqlteam.com/forums/pop_profile.asp?mode=display&amp;amp;id=10539&lt;/font&gt;&lt;/a&gt;) the Director of the company.  Ahh he makes the big bucks..but he’s well worth it.  He steers the company in the direction of success…well most of the time&lt;/span&gt;&lt;span style="FONT-SIZE: 11pt"&gt;.  He’s been known for making programmers happy (which just doesn’t sound right).  He actually made a couple of Mladen’s group laugh!  He writes clean code…but he’s too good for that now.  Sometimes MVJ gets frustrated with code he’s inventing, but putting him in the same office with Kristen and Peso he always comes out with a monster that works. But don’t piss Kristen off or you might become a twit: &lt;a href="http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=69568"&gt;&lt;font color="#800080"&gt;http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=69568&lt;/font&gt;&lt;/a&gt;&lt;/span&gt; &lt;/li&gt;
&lt;/ul&gt;
&lt;div style="MARGIN: 0in 0in 0pt 0.25in"&gt; &lt;/div&gt;
&lt;ul style="MARGIN-TOP: 0in" type="disc"&gt;
    &lt;li style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 11pt"&gt;Jezemine (&lt;a href="http://www.sqlteam.com/forums/pop_profile.asp?mode=display&amp;amp;id=24731"&gt;&lt;font color="#800080"&gt;http://www.sqlteam.com/forums/pop_profile.asp?mode=display&amp;amp;id=24731&lt;/font&gt;&lt;/a&gt;) he would be the central brain of the entire company. The guy is brilliant IMHO. He’s like the Einstein of today (ok not that much but still he knows his stuff). He’s written some nice database documentation tool called SQLSpec http://www.elsasoft.org/. Of course the company would take ownership of it ;) (just kidding). Along with his brain he’d be in charge of the documentation support of the company. His role is essential to our customer base. Without him our customers are lost and frustrated. Him and Peso seem to find speed as a good topic to discuss when it comes to SQL: &lt;a href="http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=93911"&gt;&lt;font color="#800080"&gt;http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=93911&lt;/font&gt;&lt;/a&gt;&lt;/span&gt; &lt;/li&gt;
&lt;/ul&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt; &lt;/div&gt;
&lt;ul style="MARGIN-TOP: 0in" type="disc"&gt;
    &lt;li style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 11pt"&gt;Graz&lt;/span&gt;&lt;span style="FONT-SIZE: 11pt"&gt;…good ol graz…the one that put everyone together in one room. He insisted that it would work out…success comes with patience and hard work he would always say. He’s the heart of the corporation and when the heart stops we’re in for some trouble. Graz also runs many of the presentations and brings in special guests to help our developers and our customers as well!&lt;/span&gt;
    &lt;ul style="MARGIN-TOP: 0in" type="circle"&gt;
        &lt;li style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 11pt"&gt;See this behemoth: &lt;a href="http://www.sqlteam.com/"&gt;&lt;font color="#800080"&gt;http://www.sqlteam.com&lt;/font&gt;&lt;/a&gt;&lt;/span&gt; &lt;/li&gt;
        &lt;li style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 11pt"&gt;&lt;a href="http://www.sqlteam.com/contactus.aspx"&gt;&lt;font color="#800080"&gt;http://www.sqlteam.com/contactus.aspx&lt;/font&gt;&lt;/a&gt;&lt;/span&gt; &lt;/li&gt;
        &lt;li style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 11pt"&gt;And of course this &lt;a href="http://www.sqlteam.com/about.aspx"&gt;&lt;font color="#800080"&gt;http://www.sqlteam.com/about.aspx&lt;/font&gt;&lt;/a&gt;&lt;/span&gt; &lt;/li&gt;
    &lt;/ul&gt;
    &lt;/li&gt;
&lt;/ul&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt; &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 11pt"&gt;We’d hire some major players as well guys / gals like:&lt;/span&gt;&lt;/div&gt;
&lt;ul style="MARGIN-TOP: 0in" type="disc"&gt;
    &lt;ul style="MARGIN-TOP: 0in" type="circle"&gt;
        &lt;ul style="MARGIN-TOP: 0in" type="disc"&gt;
            &lt;li style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 11pt"&gt; Madhivanan &lt;a href="http://www.sqlteam.com/forums/pop_profile.asp?mode=display&amp;amp;id=14266"&gt;&lt;font color="#800080"&gt;http://www.sqlteam.com/forums/pop_profile.asp?mode=display&amp;amp;id=14266&lt;/font&gt;&lt;/a&gt;&lt;/span&gt; &lt;/li&gt;
        &lt;/ul&gt;
    &lt;/ul&gt;
&lt;/ul&gt;
&lt;div style="MARGIN: 0in 0in 0pt 1.25in"&gt; &lt;/div&gt;
&lt;ul style="MARGIN-TOP: 0in" type="disc"&gt;
    &lt;ul style="MARGIN-TOP: 0in" type="circle"&gt;
        &lt;ul style="MARGIN-TOP: 0in" type="disc"&gt;
            &lt;li style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 11pt"&gt;Dinakar &lt;a href="http://www.sqlteam.com/forums/pop_profile.asp?mode=display&amp;amp;id=27687"&gt;&lt;font color="#800080"&gt;http://www.sqlteam.com/forums/pop_profile.asp?mode=display&amp;amp;id=27687&lt;/font&gt;&lt;/a&gt;&lt;/span&gt; &lt;/li&gt;
        &lt;/ul&gt;
    &lt;/ul&gt;
&lt;/ul&gt;
&lt;div style="MARGIN: 0in 0in 0pt 1.25in"&gt; &lt;/div&gt;
&lt;ul style="MARGIN-TOP: 0in" type="disc"&gt;
    &lt;ul style="MARGIN-TOP: 0in" type="circle"&gt;
        &lt;ul style="MARGIN-TOP: 0in" type="disc"&gt;
            &lt;li style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 11pt"&gt;Khtan &lt;a href="http://www.sqlteam.com/forums/pop_profile.asp?mode=display&amp;amp;id=19400"&gt;&lt;font color="#800080"&gt;http://www.sqlteam.com/forums/pop_profile.asp?mode=display&amp;amp;id=19400&lt;/font&gt;&lt;/a&gt;&lt;/span&gt; &lt;/li&gt;
        &lt;/ul&gt;
    &lt;/ul&gt;
&lt;/ul&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt; &lt;/div&gt;
&lt;ul style="MARGIN-TOP: 0in" type="disc"&gt;
    &lt;ul style="MARGIN-TOP: 0in" type="circle"&gt;
        &lt;ul style="MARGIN-TOP: 0in" type="disc"&gt;
            &lt;li style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 11pt"&gt;Rockmoose &lt;a href="http://www.sqlteam.com/forums/pop_profile.asp?mode=display&amp;amp;id=11815"&gt;&lt;font color="#800080"&gt;http://www.sqlteam.com/forums/pop_profile.asp?mode=display&amp;amp;id=11815&lt;/font&gt;&lt;/a&gt;&lt;/span&gt; &lt;/li&gt;
        &lt;/ul&gt;
    &lt;/ul&gt;
&lt;/ul&gt;
&lt;div style="MARGIN: 0in 0in 0pt 1.25in"&gt; &lt;/div&gt;
&lt;ul style="MARGIN-TOP: 0in" type="disc"&gt;
    &lt;ul style="MARGIN-TOP: 0in" type="circle"&gt;
        &lt;ul style="MARGIN-TOP: 0in" type="disc"&gt;
            &lt;li style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 11pt"&gt;TG (whose been awfully quiet lately) &lt;a href="http://www.sqlteam.com/forums/pop_profile.asp?mode=display&amp;amp;id=14720"&gt;&lt;font color="#800080"&gt;http://www.sqlteam.com/forums/pop_profile.asp?mode=display&amp;amp;id=14720&lt;/font&gt;&lt;/a&gt;&lt;/span&gt; &lt;/li&gt;
        &lt;/ul&gt;
    &lt;/ul&gt;
&lt;/ul&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt; &lt;/div&gt;
&lt;ul style="MARGIN-TOP: 0in" type="disc"&gt;
    &lt;ul style="MARGIN-TOP: 0in" type="circle"&gt;
        &lt;ul style="MARGIN-TOP: 0in" type="disc"&gt;
            &lt;li style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 11pt"&gt;Eyechart &lt;a href="http://www.sqlteam.com/forums/pop_profile.asp?mode=display&amp;amp;id=8399"&gt;&lt;font color="#800080"&gt;http://www.sqlteam.com/forums/pop_profile.asp?mode=display&amp;amp;id=8399&lt;/font&gt;&lt;/a&gt;&lt;/span&gt; &lt;/li&gt;
        &lt;/ul&gt;
    &lt;/ul&gt;
&lt;/ul&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt; &lt;/div&gt;
&lt;ul style="MARGIN-TOP: 0in" type="disc"&gt;
    &lt;ul style="MARGIN-TOP: 0in" type="circle"&gt;
        &lt;ul style="MARGIN-TOP: 0in" type="disc"&gt;
            &lt;li style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 11pt"&gt;Elwoos &lt;a href="http://www.sqlteam.com/forums/pop_profile.asp?mode=display&amp;amp;id=7478"&gt;&lt;font color="#800080"&gt;http://www.sqlteam.com/forums/pop_profile.asp?mode=display&amp;amp;id=7478&lt;/font&gt;&lt;/a&gt;&lt;/span&gt; &lt;/li&gt;
        &lt;/ul&gt;
    &lt;/ul&gt;
&lt;/ul&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt; &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 11pt"&gt;We’d be a lot like google minus those colors and the lava lamps. Work environment would include jeans, tshirts, pajamas, and even shorts. Roller blading / biking to work would be an option. We’d all have lunch together … maybe Emerald would cook! We’d all become rich too…our stock options would supersede our pay rates just some day.&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt; &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 11pt"&gt;Maybe just maybe…Of course affording all of you would probably be impossible…but then again it’s just a dream.&lt;/span&gt;&lt;/div&gt;&lt;img src="http://weblogs.sqlteam.com/jhermiz/aggbug/60432.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Jon Hermiz</dc:creator>
            <guid>http://weblogs.sqlteam.com/jhermiz/archive/2007/12/17/What-If-The-Dream-Company.aspx</guid>
            <pubDate>Mon, 17 Dec 2007 16:07:24 GMT</pubDate>
            <comments>http://weblogs.sqlteam.com/jhermiz/archive/2007/12/17/What-If-The-Dream-Company.aspx#feedback</comments>
            <slash:comments>9</slash:comments>
            <wfw:commentRss>http://weblogs.sqlteam.com/jhermiz/comments/commentRss/60432.aspx</wfw:commentRss>
        </item>
        <item>
            <title>How To Create A Sharepoint Like Calendar In ASP.net</title>
            <category>.NET</category>
            <category>SQL Server</category>
            <link>http://weblogs.sqlteam.com/jhermiz/archive/2007/12/17/How-To-Create-A-Sharepoint-Like-Calendar-In-ASP.net.aspx</link>
            <description>&lt;p&gt;This article relates to a couple of articles that are on the site.  The original article was "Cool Tricks With The ASP.net Calendar".  You can find this here: &lt;font face="Arial"&gt;&lt;a href="http://weblogs.sqlteam.com/jhermiz/archive/2007/12/10/Cool-Tricks-With-The-ASP.net-Calendar.aspx"&gt;http://weblogs.sqlteam.com/jhermiz/archive/2007/12/10/Cool-Tricks-With-The-ASP.net-Calendar.aspx&lt;/a&gt;.  The other article you might find useful is the "Additional Tip For that Calendar Control In ASP.net" this article can be found here: &lt;font face="Arial"&gt;&lt;a href="http://weblogs.sqlteam.com/jhermiz/archive/2007/12/11/Additional-Tip-For-That-Calendar-Control-In-ASP.net.aspx"&gt;http://weblogs.sqlteam.com/jhermiz/archive/2007/12/11/Additional-Tip-For-That-Calendar-Control-In-ASP.net.aspx&lt;/a&gt;. &lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;Have you ever wanted to create a nice calendar control much like the sharepoint calendar control?  You know the calendar control with hyperlink data directly on each calendar day.  The previous articles shows you how to use the DayRender Calendar control event to add image controls.  But what about adding hyperlink controls as well as setting the NavigateURL property for each hyperlink to take you to another web page.&lt;/p&gt;
&lt;p&gt;This process is very similiar to the second article where we added image controls to a calendar control.  Now we want to simply add hyperlink controls.&lt;/p&gt;
&lt;p&gt;To do this drag and drop a calendar control on your web page.  Use your SQL knowledge to pull some data (with the date for each row of data) from your database table.  Store this data in a datatable or a dataset.  Then loop through your data and compare the date in your dataset / datatable with the day in the Calendar_DayRender event.  If they are equal instantiate a Hyperlink object.  Set its text property, its navigateurl property and whether or not you want a border.&lt;/p&gt;
&lt;p&gt;From our previous examples here's some code to help you out:&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;pre&gt;Protected Sub Calendar13_DayRender(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DayRenderEventArgs) Handles Calendar13.DayRender
        Dim nextDate As DateTime
        Dim hl As HyperLink
        Dim onmouseoverStyle As String = "this.style.backgroundColor='#D4EDFF'"
        Dim onmouseoutStyle As String = "this.style.backgroundColor='@BackColor'"
        Dim rowBackColor As String = String.Empty
        Dim notTouched As Boolean

        notTouched = True
        Try
            If Not CType(Session("dsHolidays"), DataSet) Is Nothing Then
                For Each dr As DataRow In CType(Session("dsHolidays"), DataSet).Tables(0).Rows
                    nextDate = CType(dr("HolidayDate"), DateTime)
                    If nextDate = e.Day.Date Then
                        e.Cell.BackColor = System.Drawing.Color.Pink
                        e.Cell.ForeColor = System.Drawing.ColorTranslator.FromHtml("#24618E")
                        notTouched = False
                    End If
                Next
            End If

            If Not CType(Session("dsRequests2"), DataSet) Is Nothing Then
                For Each dr As DataRow In CType(Session("dsRequests2"), DataSet).Tables(0).Rows
                    nextDate = CType(dr("VacationDate"), DateTime)
                    If nextDate = e.Day.Date Then&lt;strong&gt;
                        hl = New HyperLink
                        hl.Text = CType(dr("ToolTip"), String)
                        hl.NavigateUrl = "Entry.aspx?ID=" &amp;amp; CType(dr("VacationID"), String)
                        hl.BorderColor = Color.Gray
                        hl.BorderWidth = 1
                        hl.ToolTip = "Click this item to get more detailed information."
                        hl.Font.Name = "Arial Narrow"
                        hl.Font.Bold = False
                        hl.ForeColor = System.Drawing.ColorTranslator.FromHtml("#24618E")
                        e.Cell.BackColor = Color.Azure
                        e.Cell.Controls.Add(hl) &lt;/strong&gt;
                        notTouched = False
                    End If
                Next
            End If

            If notTouched And Not e.Day.IsWeekend Then
                e.Cell.Attributes.Add("onmouseover", onmouseoverStyle)
                e.Cell.Attributes.Add("onmouseout", onmouseoutStyle.Replace("@BackColor", rowBackColor))
            End If
        Catch ex As Exception
            Response.Write("Errors occurred: No RuleID / Hire Date specified for user!  " &amp;amp; "Additional errors include: " &amp;amp; ex.ToString())
        End Try
        
    End Sub&lt;/pre&gt;
&lt;p&gt;The result:&lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="http://img264.imageshack.us/img264/6677/testyrc8.gif" /&gt;&lt;/p&gt;&lt;img src="http://weblogs.sqlteam.com/jhermiz/aggbug/60431.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Jon Hermiz</dc:creator>
            <guid>http://weblogs.sqlteam.com/jhermiz/archive/2007/12/17/How-To-Create-A-Sharepoint-Like-Calendar-In-ASP.net.aspx</guid>
            <pubDate>Mon, 17 Dec 2007 14:01:49 GMT</pubDate>
            <comments>http://weblogs.sqlteam.com/jhermiz/archive/2007/12/17/How-To-Create-A-Sharepoint-Like-Calendar-In-ASP.net.aspx#feedback</comments>
            <slash:comments>15</slash:comments>
            <wfw:commentRss>http://weblogs.sqlteam.com/jhermiz/comments/commentRss/60431.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Additional Tip For That Calendar Control In ASP.net</title>
            <category>.NET</category>
            <category>SQL Server</category>
            <link>http://weblogs.sqlteam.com/jhermiz/archive/2007/12/11/Additional-Tip-For-That-Calendar-Control-In-ASP.net.aspx</link>
            <description>&lt;p&gt;Regarding my post about the &lt;a href="http://weblogs.sqlteam.com/jhermiz/archive/2007/12/10/Cool-Tricks-With-The-ASP.net-Calendar.aspx"&gt;tips and tricks with the ASP.net calendar control&lt;/a&gt; someone emailed me asking how to add additional text / images to the calendar control to give the calendar day a more appealing visual representation.&lt;/p&gt;
&lt;p&gt;Something to this effect:&lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="http://img405.imageshack.us/img405/6263/imagesgo0.gif" /&gt;&lt;/p&gt;
&lt;p&gt;You handle images like so in the same event as we discussed before.  The event you want to use for this is the &lt;strong&gt;DayRender&lt;/strong&gt; event since you want to control each &lt;strong&gt;day&lt;/strong&gt;.  Anytime you need to handle something that is associated with a single day cell you have to take care of it in the day render event.  &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;How To Do This&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I assume the reader has a good understanding of ASP.net, the web, and SQL.  In my case I had some fields to store a request status.  A request can be in three states:&lt;/p&gt;
&lt;ol&gt;
    &lt;li&gt;Pending (yellow question mark) &lt;/li&gt;
    &lt;li&gt;Approved (green check mark) &lt;/li&gt;
    &lt;li&gt;Declined (a red x) &lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;So in my previous post I showed you how to pull the requests from the SQL database.  Remember you do not have to do it this way, I am just showing you an example.  So in the DayRender event declare an Image web control:&lt;/p&gt;
&lt;p&gt;Dim s as System.Web.UI.WebControls.Image&lt;/p&gt;
&lt;p&gt;Then perform the following:&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;Instantiate the object &lt;/li&gt;
    &lt;li&gt;Set its image url property &lt;/li&gt;
    &lt;li&gt;Set a tooltip (optional) &lt;/li&gt;
    &lt;li&gt;Add the image object to the Controls collection of e ( e.Cell.Controls.Add) &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So here we go:&lt;/p&gt;
&lt;p&gt;s = New System.Web.UI.WebControls.Image()&lt;/p&gt;
&lt;p&gt;With s&lt;/p&gt;
&lt;p&gt;  .ImageUrl = "~/images/yourimage.gif"&lt;/p&gt;
&lt;p&gt;  .ToolTip = "Some tool tip"&lt;/p&gt;
&lt;p&gt;End With&lt;/p&gt;
&lt;p&gt;e.Cell.Controls.Add(s)&lt;/p&gt;
&lt;p&gt;In my case I store some tool tip information inside of the actual database by concatenating some fields together and bringing them back in a stored procedure.  That way I can set the tool tip with some text that may be valuable to the end user.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href="http://weblogs.sqlteam.com/jhermiz/archive/2007/12/10/Cool-Tricks-With-The-ASP.net-Calendar.aspx"&gt;From Our Previous Example&lt;/a&gt;&lt;/strong&gt; &lt;/p&gt;
&lt;pre&gt;Protected Sub Calendar13_DayRender(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DayRenderEventArgs) Handles Calendar13.DayRender
        Dim nextDate As DateTime
        Dim onmouseoverStyle As String = "this.style.backgroundColor='#D4EDFF'"
        Dim onmouseoutStyle As String = "this.style.backgroundColor='@BackColor'"
        Dim rowBackColor As String = String.Empty
        Dim notTouched As Boolean
        Dim s As System.Web.UI.WebControls.Image

        notTouched = True

        Try
            If Not CType(Session("dsRequests"), DataSet) Is Nothing Then
                For Each dr As DataRow In CType(Session("dsRequests"), DataSet).Tables(0).Rows
                    nextDate = CType(dr("VacationDate"), DateTime)
                    If nextDate = e.Day.Date Then
                        e.Cell.BackColor = System.Drawing.ColorTranslator.FromHtml(CType(dr("HTMLColor"), String))

                        Select Case (CType(dr("VacationStatusID"), String))
                            Case "Pending"
                                s = New System.Web.UI.WebControls.Image()
                                s.ImageUrl = "~/images/p.gif"
                                s.ToolTip = CType(dr("ToolTip"), String)
                                e.Cell.Controls.Add(s)

                            Case "Approved"
                                s = New System.Web.UI.WebControls.Image()
                                s.ImageUrl = "~/images/a.gif"
                                s.ToolTip = CType(dr("ToolTip"), String)
                                e.Cell.Controls.Add(s)

                            Case "Declined"
                                s = New System.Web.UI.WebControls.Image()
                                s.ImageUrl = "~/images/d.gif"
                                s.ToolTip = CType(dr("ToolTip"), String)
                                e.Cell.Controls.Add(s)
                            Case Else
                        End Select

                        notTouched = False
                    End If
                Next
            End If

            If notTouched And Not e.Day.IsWeekend Then
                e.Cell.Attributes.Add("onmouseover", onmouseoverStyle)
                e.Cell.Attributes.Add("onmouseout", onmouseoutStyle.Replace("@BackColor", rowBackColor))
            End If

        Catch ex As Exception
            Response.Write("Errors occurred: No RuleID / Hire Date specified for user!  " &amp;amp; "Additional errors include: " &amp;amp; ex.ToString())
        End Try
    End Sub
&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;&lt;img src="http://weblogs.sqlteam.com/jhermiz/aggbug/60427.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Jon Hermiz</dc:creator>
            <guid>http://weblogs.sqlteam.com/jhermiz/archive/2007/12/11/Additional-Tip-For-That-Calendar-Control-In-ASP.net.aspx</guid>
            <pubDate>Tue, 11 Dec 2007 20:25:24 GMT</pubDate>
            <comments>http://weblogs.sqlteam.com/jhermiz/archive/2007/12/11/Additional-Tip-For-That-Calendar-Control-In-ASP.net.aspx#feedback</comments>
            <slash:comments>11</slash:comments>
            <wfw:commentRss>http://weblogs.sqlteam.com/jhermiz/comments/commentRss/60427.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Cool Tricks With The ASP.net Calendar </title>
            <category>.NET</category>
            <category>SQL Server</category>
            <link>http://weblogs.sqlteam.com/jhermiz/archive/2007/12/10/Cool-Tricks-With-The-ASP.net-Calendar.aspx</link>
            <description>&lt;p&gt;&lt;strong&gt;UPDATE: Additional tips: &lt;font face="Arial"&gt;&lt;a href="http://weblogs.sqlteam.com/jhermiz/archive/2007/12/11/Additional-Tip-For-That-Calendar-Control-In-ASP.net.aspx"&gt;More Tips&lt;/a&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Been A Long Time&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Hello world...sorry I haven't posted in quite some time, we've been real busy at home this Christmas season.  Anyhow I thought I would share some tricks and tips with using the calendar control before you or your company spends some change to buy a control on the internet.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What Is The ASP.NET Calendar Control&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The ASP.net calendar control is simply the calendar that comes prepackaged with visual studio and is available as a standard control.  Here she is on the standard control:&lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="http://img513.imageshack.us/img513/7/calcontrolju4.gif" /&gt;&lt;/p&gt;
&lt;p&gt;And here is what the calendar control may look like:&lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="http://img129.imageshack.us/img129/4420/calendarrk4.gif" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Problem&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;You have been tasked to create a time off tool request involving some pretty complicated things.  Your boss has asked for numerous features in this tool which you hoped he had never asked.  &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Da Boss&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="http://img233.imageshack.us/img233/4896/bossso1.gif" /&gt; &lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;I want it to highlight specific days signaling holidays or time off requests. This helps me visualize what type of day the request is.   Color coding is a plus :-). &lt;/li&gt;
    &lt;li&gt;I'd like some nice mouse over effect on days that are not requested.  This helps the user notice a clickable type of cell. &lt;/li&gt;
    &lt;li&gt;O I dunno...I'd like to not only see a monthly view, but a yearly view so that I can quickly glance over an entire year for an employee. &lt;/li&gt;
    &lt;li&gt;O well...I dunno...Impress me...maybe allow a user to click a day on the calendar and have it go to a page with that calendar day being selected. &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Umm you know the &lt;strong&gt;&lt;em&gt;simple &lt;/em&gt;&lt;/strong&gt;things..besides you have all the tools that the company has purchased for you.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;You&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="http://img127.imageshack.us/img127/148/youtz6.gif" /&gt;&lt;/p&gt;
&lt;p&gt;Thoughts to self: ***&lt;strong&gt;O NO NOT THE CALENDAR CONTROL...BUT CANT WE JUST BUY SOMETHING PRE MADE***&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Boss&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="http://img233.imageshack.us/img233/4896/bossso1.gif" /&gt;&lt;/p&gt;
&lt;p&gt;O by the way...we don't have any money to buy any third party tools...have a great day.  Don't forget to e-mail when its all done.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;You&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="http://img127.imageshack.us/img127/148/youtz6.gif" /&gt;&lt;/p&gt;
&lt;p&gt;O certainly boss...*cringe*...this should be no sweat *thank God I wore deodorant*.  Quickly images begin flashing in your head about what your boss said:&lt;/p&gt;
&lt;p&gt;"I want it to highlight specific days signaling holidays or time off requests. This helps me visualize what type of day the request is.   Color coding is a plus :-)."&lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="http://img86.imageshack.us/img86/1786/calendarcolorfl4.gif" /&gt;&lt;/p&gt;
&lt;p&gt;"I'd like some nice mouse over effect on days that are not requested.  This helps the user notice a clickable type of cell."&lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="http://img129.imageshack.us/img129/493/testtq7.gif" /&gt;&lt;/p&gt;
&lt;p&gt;"O I dunno...I'd like to not only see a monthly view, but a yearly view so that I can quickly glance over an entire year for an employee."&lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="http://img129.imageshack.us/img129/7808/yearlycr3.gif" /&gt;&lt;/p&gt;
&lt;p&gt;"O well...I dunno...Impress me...maybe allow a user to click a day on the calendar and have it go to a page with that calendar day being selected."&lt;/p&gt;
&lt;p&gt;**Ok that one is simple response.redirect and send a query string**&lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="http://img127.imageshack.us/img127/148/youtz6.gif" /&gt;How in the world am I going to do all of these with the ASP.net calendar control?  That control is just so dull, so plain, difficult to use.  &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Got To Get To Work&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Well the ASP.net calendar control is pretty limited, its got a few events you can hook onto.  In fact when I started writing code using this control I was pretty upset because the control just seemed plain, really stale, didn't live up to my expectations.  But I was forced to use it.  Sure you can probably spend 100-200 bucks on a &lt;a href="http://www.telerik.com/"&gt;RAD Control&lt;/a&gt;...but do you really need to.  Most everything the &lt;strong&gt;Boss&lt;/strong&gt; wants is right there in the calendar control.  So lets tackle it one step at a time.&lt;/p&gt;
&lt;p&gt;Lets do the simple one first.  Before we begin, I am putting a caution that this code may need to be cleaned, this could o r could not be production code, it is merely a sample.  Samples help beginners and even advanced programmers learn how they can accomplish a specific task.  So take what you need and modify to fit your needs.  &lt;strong&gt;DO NOT EMAIL ME SAYING HOW BAD / GOOD IT IS TO DO A SPECIFIC THING.  TAKE WHAT YOU NEED AND RUN!!!  &lt;/strong&gt;Ok done with the rant.  Now lets take the simple example of how to create the rollover effect of the calendar.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Rollover Effect&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;At first you might think to use the PreRender event to handle this.  The problem with the PreRender event in this case will cause your entire calendar to highlight a specific color when you roll over it.  To avoid this let's use the DayRender event this will ensure that the rollover effect is per day and not per calendar.  To do this first decide what color you want to use to highlight the calendar when you rollover it (onMouseOver).  Then decide what color you want to highlight when you are off of the calendar day (onMouseOut).&lt;/p&gt;
&lt;p&gt;In this case I will use a light shade of blue (almost a baby blue) as the onMouseOver color and I'll use white for the onMouseOut color.  You can use hex codes or named colors, both work using this code.  You can also obtain the default backcolor property using @BackColor.&lt;/p&gt;
&lt;p&gt;Heres some vb.net to help you:&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt; &lt;/p&gt;
&lt;pre&gt; Protected Sub Calendar13_DayRender(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DayRenderEventArgs) Handles Calendar13.DayRender
 	 Dim onmouseoverStyle As String = "this.style.backgroundColor='#D4EDFF'"
	 Dim onmouseoutStyle As String = "this.style.backgroundColor='@BackColor'"
	 Dim rowBackColor As String = String.Empty
            
	 e.Cell.Attributes.Add("onmouseover", onmouseoverStyle)
	 e.Cell.Attributes.Add("onmouseout", onmouseoutStyle.Replace("@BackColor", rowBackColor))
    
     If Not e.Day.IsWeekend Then
                e.Cell.Attributes.Add("onmouseover", onmouseoverStyle)
                e.Cell.Attributes.Add("onmouseout", onmouseoutStyle.Replace("@BackColor", rowBackColor))
     End If
 End Sub
&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt; So here all you're doing is setting a mouseOver for days that are not weekends.  The result:&lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="http://img129.imageshack.us/img129/493/testtq7.gif" /&gt;&lt;/p&gt;
&lt;p&gt;Ok so now that we are done with the highlight effect lets look at the example of color coding specific days.  &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Color Coding Specific Days In The ASP.net Calendar Control&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In this case I assume the reader knows how to use datatables, datasets, and common sql statements such as SELECT, INSERT, UPDATE, etc.  So assume you have a table that has time off requests.  In this table you have a field where you store the time off request date.  You want the days requested off visually displayed on the calendar control in a different color.  To do this you simply write a stored procedure to pull your data.  You then store this data inside of a datatable or a dataset.  Once you have done this you check the e.Day.Date property with the value stored in your data row value.  If the values match you handle this event and you change the e.Cell.BackColor.&lt;/p&gt;
&lt;p&gt;In my case I will use a dataset that is stored in a session variable.  You do not need to do it like this, this is just an example.  For instance, you may want to use a data table, or maybe you just want a dataset but you do not want to store it in a session variable.  In any event you preform this code yet again in the DayRender event of the calendar control.&lt;/p&gt;
&lt;p&gt;Here is some code that will help make more sense:&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;hr /&gt;
&lt;pre&gt;Protected Sub Calendar13_DayRender(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DayRenderEventArgs) Handles Calendar13.DayRender 

        Dim nextDate As DateTime
 
        Try
               'this part is the actual time off requests
            If Not CType(Session("dsRequests"), DataSet) Is Nothing Then
                For Each dr As DataRow In CType(Session("dsRequests"), DataSet).Tables(0).Rows
                    nextDate = CType(dr("VacationDate"), DateTime)
                    If nextDate = e.Day.Date Then
                        e.Cell.BackColor = System.Drawing.ColorTranslator.FromHtml(CType(dr("HTMLColor"), String))
                  End If
                Next
            End If
 
        Catch ex As Exception
            Response.Write("Errors occurred: No RuleID / Hire Date specified for user! " &amp;amp; "Additional errors include: " &amp;amp; ex.ToString())
        End Try
    End Sub
&lt;/pre&gt;
&lt;hr /&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;&lt;span style="COLOR: blue"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt"&gt;&lt;span style="COLOR: blue"&gt;&lt;/span&gt;&lt;/span&gt;
&lt;p&gt;What's going on in this code.  Well first and foremost get rid of what you don't need and change field names, code based on your needs.  In my table I store a field called VacationDate this field has the date value of the time off request.  I assign this value to nextDate and compare nextDate with e.Day.Date.  If these values are the same then I set the e.Cell.BackColor to a color based on another field in my database HTMLColor.  You do not have to have this field, this field is used because in my circumstances we have many time off request types and I want to associate a hex color with each time off type.  You may want to only use a specific color like, &lt;font size="2"&gt;System.Drawing.Color.Red.  In this case you would do:&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;e.Cell.BackColor =  &lt;font size="2"&gt;System.Drawing.Color.Red&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;font size="2"&gt;So the steps are:&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;ol&gt;
    &lt;li&gt;&lt;font size="2"&gt;&lt;font size="2"&gt;Pull the data using a stored procedure, order it by date asc&lt;/font&gt;&lt;/font&gt; &lt;/li&gt;
    &lt;li&gt;&lt;font size="2"&gt;&lt;font size="2"&gt;Take this data and store it in a dataset or a datatable&lt;/font&gt;&lt;/font&gt; &lt;/li&gt;
    &lt;li&gt;&lt;font size="2"&gt;&lt;font size="2"&gt;Use the DayRender event to handle the event each day&lt;/font&gt;&lt;/font&gt; &lt;/li&gt;
    &lt;li&gt;&lt;font size="2"&gt;&lt;font size="2"&gt;Check if e.Day.Date is equal to your date that was returned from the database (dr("HolidayDate") from above)&lt;/font&gt;&lt;/font&gt; &lt;/li&gt;
    &lt;li&gt;&lt;font size="2"&gt;&lt;font size="2"&gt;If the values match up set the e.Cell.BackColor property to the color you want.  Better yet store a color hex value in your database for each type of time off request.&lt;/font&gt;&lt;/font&gt; &lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;font size="2"&gt;&lt;strong&gt;But I Used The DayRender Event For That OnMouseOver Effect Now What?&lt;/strong&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;font size="2"&gt;Simple, combine both together like so:&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;pre&gt;    Protected Sub Calendar13_DayRender(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DayRenderEventArgs) Handles Calendar13.DayRender
        Dim nextDate As DateTime
        Dim onmouseoverStyle As String = "this.style.backgroundColor='#D4EDFF'"
        Dim onmouseoutStyle As String = "this.style.backgroundColor='@BackColor'"
        Dim rowBackColor As String = String.Empty
        Dim notTouched As Boolean

        notTouched = True

        Try
            If Not CType(Session("dsHolidays"), DataSet) Is Nothing Then
                For Each dr As DataRow In CType(Session("dsHolidays"), DataSet).Tables(0).Rows
                    nextDate = CType(dr("HolidayDate"), DateTime)
                    If nextDate = e.Day.Date Then
                        e.Cell.BackColor = System.Drawing.Color.Pink
                        notTouched = False
                    End If
                Next
            End If

            If Not CType(Session("dsRequests"), DataSet) Is Nothing Then
                For Each dr As DataRow In CType(Session("dsRequests"), DataSet).Tables(0).Rows
                    nextDate = CType(dr("VacationDate"), DateTime)
                    If nextDate = e.Day.Date Then
                        e.Cell.BackColor = System.Drawing.ColorTranslator.FromHtml(CType(dr("HTMLColor"), String))
                        notTouched = False
                  End If
                Next
            End If

            If notTouched And Not e.Day.IsWeekend Then
                e.Cell.Attributes.Add("onmouseover", onmouseoverStyle)
                e.Cell.Attributes.Add("onmouseout", onmouseoutStyle.Replace("@BackColor", rowBackColor))
            End If

        Catch ex As Exception
            Response.Write("Errors occurred: No RuleID / Hire Date specified for user!  " &amp;amp; "Additional errors include: " &amp;amp; ex.ToString())
        End Try

    End Sub
&lt;/pre&gt;
&lt;hr /&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;strong&gt;&lt;img alt="" src="http://img129.imageshack.us/img129/493/testtq7.gif" /&gt; &lt;/strong&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;The OnMouseOver effect as well as the colored background cells on the 7th and the 25th of December 07.&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt; &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;strong&gt;But What If I Am Using More Then One Calendar Control&lt;/strong&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;strong&gt;&lt;/strong&gt; &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;There is always those what if's.  You may be using more then one calendar control in your application, if you are no problem.  In this case create a sub routine to HANDLES all the calendar objects in your application.  For instance, assume you have 12 calendar controls then your subroutine signature should look like this:&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt; &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;hr /&gt;
&lt;/div&gt;
&lt;pre&gt;Private Sub DayRender(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DayRenderEventArgs) Handles Calendar1.DayRender, Calendar2.DayRender, _ 
                          Calendar3.DayRender, Calendar4.DayRender, Calendar5.DayRender, Calendar6.DayRender, Calendar7.DayRender, Calendar8.DayRender, Calendar9.DayRender, _
                          Calendar10.DayRender, Calendar11.DayRender, Calendar12.DayRender
&lt;/pre&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;hr /&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;This shows one sub routine called DayRender which can handle the DayRender event of any of the 12 calendars.&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;The rest of the code is very similiar to what we posted previously:&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;hr /&gt;
&lt;/div&gt;
&lt;pre&gt;Private Sub DayRender(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DayRenderEventArgs) Handles Calendar1.DayRender, Calendar2.DayRender, _ 
                          Calendar3.DayRender, Calendar4.DayRender, Calendar5.DayRender, Calendar6.DayRender, Calendar7.DayRender, Calendar8.DayRender, Calendar9.DayRender, _
                          Calendar10.DayRender, Calendar11.DayRender, Calendar12.DayRender
 
        Dim nextDate As DateTime
        Dim cal As Calendar = CType(sender, Calendar)
        Dim onmouseoverStyle As String = "this.style.backgroundColor='#D4EDFF'"
        Dim onmouseoutStyle As String = "this.style.backgroundColor='@BackColor'"
        Dim rowBackColor As String = String.Empty
        Dim notTouched As Boolean
 
        notTouched = True
 
        If e.Day.Date.Month &amp;lt;&amp;gt; cal.TodaysDate.Month Then Exit Sub
 
        Try
            If Not CType(Session("dsRequests"), DataSet) Is Nothing Then
                For Each dr As DataRow In CType(Session("dsRequests"), DataSet).Tables(0).Rows
                    nextDate = CType(dr("VacationDate"), DateTime)
                    If nextDate = e.Day.Date Then
                        e.Cell.BackColor = System.Drawing.ColorTranslator.FromHtml(CType(dr("HTMLColor"), String))
                        notTouched = False
                    End If
                Next
            End If
 
            If notTouched And Not e.Day.IsWeekend Then
                e.Cell.Attributes.Add("onmouseover", onmouseoverStyle)
                e.Cell.Attributes.Add("onmouseout", onmouseoutStyle.Replace("@BackColor", rowBackColor))
            End If
 
        Catch ex As Exception
            Response.Write("Errors occurred: No RuleID / Hire Date specified for user! " &amp;amp; "Additional errors include: " &amp;amp; ex.ToString())
        End Try
    End Sub
&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;In this case we handle all 12 calendar controls.  The result is as follows:&lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="http://img513.imageshack.us/img513/3651/testyig8.gif" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Passing The Date To Another Page&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Suppose you want to pass a calendar day to a Response.Redirect to another page when you click on a calendar day.  Here you can simply pass a parameter to a page like so:&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;Response.Redirect(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;"entry.aspx?VacationDate="&lt;/font&gt;&lt;font size="2"&gt; &amp;amp; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;CType&lt;/font&gt;&lt;font size="2"&gt;(Calendar13.SelectedDate, &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Date&lt;/font&gt;&lt;font size="2"&gt;))&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;And to pull that date in the entry.aspx page simply use the following:&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;font size="2"&gt;Dim d as Date&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;d&lt;font size="2"&gt; = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;CType&lt;/font&gt;&lt;font size="2"&gt;(Request(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;"VacationDate"&lt;/font&gt;&lt;font size="2"&gt;), &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Date&lt;/font&gt;&lt;font size="2"&gt;) &lt;/font&gt;&lt;font color="#008000" size="2"&gt;'grab date&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;Hope this helps someone out there who needs to do something similiar.&lt;span style="FONT-SIZE: 10pt"&gt;   &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt"&gt;&lt;span style="COLOR: blue"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;&lt;img src="http://weblogs.sqlteam.com/jhermiz/aggbug/60423.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Jon Hermiz</dc:creator>
            <guid>http://weblogs.sqlteam.com/jhermiz/archive/2007/12/10/Cool-Tricks-With-The-ASP.net-Calendar.aspx</guid>
            <pubDate>Mon, 10 Dec 2007 17:16:28 GMT</pubDate>
            <comments>http://weblogs.sqlteam.com/jhermiz/archive/2007/12/10/Cool-Tricks-With-The-ASP.net-Calendar.aspx#feedback</comments>
            <slash:comments>51</slash:comments>
            <wfw:commentRss>http://weblogs.sqlteam.com/jhermiz/comments/commentRss/60423.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Forgetting the little things in life...</title>
            <category>.NET</category>
            <category>Other</category>
            <link>http://weblogs.sqlteam.com/jhermiz/archive/2007/08/22/Forgetting-the-little-things-in-life.aspx</link>
            <description>&lt;p&gt;Remember the good old hello world program?  Ahh the first program any teacher in any type of programming course would assign was good old &lt;strong&gt;Hello World&lt;/strong&gt;.  But as students / new developers we were excited!  Wow my first program and I got it to say Hello World and it displayed it right on my screen.  "Just take a look" you'd say to the student next to you, I even included the header iostream.h.  &lt;/p&gt;
&lt;p&gt;How did our young minds go from writing programs like Hello World to robust database applications in the .net framework?  Do you ever wonder how your mind has actually created the beasts that people are using today?  Admit it, you are smart, better yet we are smart.  Computer Science guys are engineers, we're doctors, we are artists, and we're even lawyer's.  We have to take large business processes and convert it into a useable tool (engineers).  We have to debug, optimize, and fix bugs (doctors).  We have to design nice interfaces, whether web based or win form, and make them useable to end users (artists).  We have to fight for what we believe, pointing blame on our clueless end users (lawyers).&lt;/p&gt;
&lt;p&gt;How did we ever go from writing hello world, and a mini calculator to these fairly large applications?  We've worked hard...that's how.  So programmers / dba's / and even you system admins take a moment smile and pat yourself on the back because you've busted your butt doing this stuff and you're damn good at it.&lt;/p&gt;
&lt;p&gt;Since we've gone to writing complex applications I sometimes look back at some basic programs and say wow this is so simple that its difficult.  I've forgotten how to think in a simple manner.  We sit day to day writing use cases, designing forms, and working on large databases that we forget how to do the simple things in life.&lt;/p&gt;
&lt;p&gt;So its time for some old school CS 101 programming assignments.  Here's 4 homework assignments you can do in any language:&lt;/p&gt;
&lt;p&gt;1) In a pretty slick way output the maximum value of a unsigned integer.  Try to not use a library which allows you to display the maximum of this value (in addition such as max.h in C++).&lt;/p&gt;
&lt;p&gt;2) Write a cash register program which displays the amount of change given back to the customer in dollars, quarters, dimes, nickels and pennies.  For instance:&lt;/p&gt;
&lt;p&gt;Your total is 18.20&lt;/p&gt;
&lt;p&gt;You give: 20 dollars&lt;/p&gt;
&lt;p&gt;Output should be:&lt;/p&gt;
&lt;p&gt;1 dollar&lt;/p&gt;
&lt;p&gt;3 quarters&lt;/p&gt;
&lt;p&gt;1 nickel &lt;/p&gt;
&lt;p&gt;The program should try to use exact change using 1 nickel instead of 5 pennies for instance.&lt;/p&gt;
&lt;p&gt;3) Write a program finding the first 500 prime numbers.  You should try to use the least amount of code and remember the limits of how to check for prime numbers..hint square roots.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;4) Write an assignment to the next person who responds to this blog.  Please be nice and make it simple on the next guy or we wont get the next response!&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Skip the ones you cant do, but #4 is a must!&lt;/p&gt;
&lt;p&gt;Have fun&lt;/p&gt;&lt;img src="http://weblogs.sqlteam.com/jhermiz/aggbug/60303.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Jon Hermiz</dc:creator>
            <guid>http://weblogs.sqlteam.com/jhermiz/archive/2007/08/22/Forgetting-the-little-things-in-life.aspx</guid>
            <pubDate>Thu, 23 Aug 2007 03:37:29 GMT</pubDate>
            <comments>http://weblogs.sqlteam.com/jhermiz/archive/2007/08/22/Forgetting-the-little-things-in-life.aspx#feedback</comments>
            <slash:comments>5</slash:comments>
            <wfw:commentRss>http://weblogs.sqlteam.com/jhermiz/comments/commentRss/60303.aspx</wfw:commentRss>
        </item>
        <item>
            <title>DevConnections 2007</title>
            <category>.NET</category>
            <category>Reporting Services</category>
            <category>SQL Server</category>
            <link>http://weblogs.sqlteam.com/jhermiz/archive/2007/08/20/DevConnections-2007.aspx</link>
            <description>&lt;p&gt;Count me in this year &lt;strong&gt;again!&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I had an excellent time last year and met some real cool folks.&lt;/p&gt;
&lt;p&gt;I'll be in the visual studio asp.net conference along with the reporting services seminars.  Bring your RS questions if you have any.&lt;/p&gt;
&lt;p&gt;Here's some pics from last years: &lt;font face="Arial"&gt;&lt;a href="http://jhermiz.googlepages.com/devconnections2006"&gt;http://jhermiz.googlepages.com/devconnections2006&lt;/a&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;I wonder if Isaac Stubbs is still cruising in that motorcycle he won??  If you've never been to devconnections before then now is the time to go.  Tell your boss you need to attend &lt;a href="http://www.devconnections.com"&gt;www.devconnections.com&lt;/a&gt;.  You get a free copy of MS Visual Studio 2k8...you can easily make a case to your boss about going.  Most of you can write it off on your taxes as well; since this helps you do your daily job.&lt;/p&gt;
&lt;p&gt;See you there!&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;&lt;img src="http://weblogs.sqlteam.com/jhermiz/aggbug/60295.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Jon Hermiz</dc:creator>
            <guid>http://weblogs.sqlteam.com/jhermiz/archive/2007/08/20/DevConnections-2007.aspx</guid>
            <pubDate>Mon, 20 Aug 2007 15:57:11 GMT</pubDate>
            <comments>http://weblogs.sqlteam.com/jhermiz/archive/2007/08/20/DevConnections-2007.aspx#feedback</comments>
            <wfw:commentRss>http://weblogs.sqlteam.com/jhermiz/comments/commentRss/60295.aspx</wfw:commentRss>
        </item>
    </channel>
</rss>
