How to Disable weekends for AjaxToolKit Calendar extender

if you want to disable the weekends for an ajax toolkit calendar
here is the way.
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
        <asp:CalendarExtender ID="TextBox1_CalendarExtender" runat="server"
            Enabled="True" TargetControlID="TextBox1" OnClientShown="DisableWeekends">
        </asp:CalendarExtender>
javascript method
           for (var i = 0; i &lt; 6; i++) {
                var row = sender._days.children[0].childNodes[1].children[i];
                for (var j = 0; j &lt; 7; j++) {
                    var cell = row.children[j].firstChild;

                    if (cell.id == sender._id + "_day_" + i + "_" + "5") {
                        cell.style.display = "none";
                    }
                    if (cell.id == sender._id + "_day_" + i + "_" + "6") {
                        cell.style.display = "none";
                    }
                }
            }

Jquery FadeOut table row not working with Internet Explorer

JQuery is write less and do more, we all know that
I have a simple table row and I want to use the fadeOut effect on this row, it is working over all the browsers  except the Internet Explorer "for sure :)"

so I try to find out the problem and whats wrong with Internet Explorer
till I understand this
I have to effect on each child 'cells' of the row before the row it self


var $tr = $(this).parent().parent();

$tr.parent().children().each(function () {
                                $(this).fadeOut('slow');
                            }).fadeOut('slow');

Reset Identity column in SQL Server

If you need for some reason to reset the identity column of the sql server
this will do it

DBCC CHECKIDENT('tableName', RESEED, 0)

zero here means the count will begin from 1 

Resolving the error: "The terminal server has exceeded the maximum number of allowed connections"

I try to log in to a server and there was a message
here is how to work around this message



To do this, simply type the following in a Start -> Run or Command Prompt.


mstsc /v:00.00.00.00 /admin 


Replace 00.00.00.00 with your server's IP Address.

Getting Mime types and file extensions from registry using C#

If you have a mime type and you want to find the default extension for this mime type, you can get this from the following registry key
HKEY_CLASSES_ROOT\MIME\Database\Content Type\<mime type>

public static string GetDefaultExtension(string mimeType)
{
  string result;
  RegistryKey key;
  object value;
  key = Registry.ClassesRoot.OpenSubKey("MIME\Database\Content Type\" + mimeType, false);
  value = key != null ? key.GetValue("Extension", null) : null;
  result = value != null ? value.ToString() : string.Empty;
  return result;
}

on the other hand, if you have the file extension and you want the mime type of this extension
HKEY_CLASSES ROOT\<extension>

public static string GetMimeTypeFromExtension(string extension)
{
  string result;
  RegistryKey key;
  object value;
  if (!extension.StartsWith("."))
    extension = "." + extension;
  key = Registry.ClassesRoot.OpenSubKey(extension, false);
  value = key != null ? key.GetValue("Content Type", null) : null;
  result = value != null ? value.ToString() : string.Empty;
  return result;
}

and this is all :) 

filter attribute that checks whether current connection is secured

using APS.net Core to mark all website pages working with https protocol we will do this using IAuthorizationFilter. and here is an exampl...