<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8870685478574718863</id><updated>2012-01-22T17:35:32.214-08:00</updated><title type='text'>Tahir Hassan's Blog</title><subtitle type='html'>My Technical Notes</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://tahirhassan.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8870685478574718863/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://tahirhassan.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Tahir Hassan</name><uri>http://www.blogger.com/profile/15135167291149715079</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>25</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8870685478574718863.post-4524625174706976000</id><published>2011-09-12T15:01:00.001-07:00</published><updated>2011-09-15T15:16:39.265-07:00</updated><title type='text'>emacs init.el</title><content type='html'>&lt;script type='syntaxhighlighter' class='brush: plain; wrap-lines: false'&gt;
;; --- start of tahirhassan.blogspot.com --- ;;

;; need to have the below or equivalent:
;; (add-to-list 'load-path "/Documents and Settings/hasst001/Application Data/.emacs.d")

(require 'bar-cursor)
(bar-cursor-mode 1)

(require 'org-install)
(add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
(define-key global-map "\C-cl" 'org-store-link)
(define-key global-map "\C-ca" 'org-agenda)
(setq org-log-done t)

(setq inhibit-startup-message t)
(setq initial-scratch-message "")

(global-set-key (kbd "&lt;C-M-S-return&gt;") 'org-insert-todo-subheading)
(global-set-key (kbd "C-z") 'undo)
(global-set-key (kbd "C-v") 'clipboard-yank)
(display-time)

;; --- end of tahirhassan.blogspot.com --- ;;
&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8870685478574718863-4524625174706976000?l=tahirhassan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tahirhassan.blogspot.com/feeds/4524625174706976000/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8870685478574718863&amp;postID=4524625174706976000' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8870685478574718863/posts/default/4524625174706976000'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8870685478574718863/posts/default/4524625174706976000'/><link rel='alternate' type='text/html' href='http://tahirhassan.blogspot.com/2011/09/emacs-initel.html' title='emacs init.el'/><author><name>Tahir Hassan</name><uri>http://www.blogger.com/profile/15135167291149715079</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8870685478574718863.post-3444326839728654183</id><published>2011-09-12T06:34:00.001-07:00</published><updated>2011-09-12T07:41:15.078-07:00</updated><title type='text'>Emacs - Setting up C-z for Undo</title><content type='html'>&lt;p&gt;Type &lt;code&gt;M-x, global-key-set &lt;enter&gt;, C-z (the new key combination), undo&lt;enter&gt;.&lt;/code&gt;&lt;/p&gt;

If you want it to be a little more permanant, put this in &lt;code&gt;.emacs/init.el&lt;/code&gt;:

&lt;script type='syntaxhighlighter' class='brush: plain; wrap-lines: false'&gt;
(global-set-key (kbd "C-z") 'undo)
&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8870685478574718863-3444326839728654183?l=tahirhassan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tahirhassan.blogspot.com/feeds/3444326839728654183/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8870685478574718863&amp;postID=3444326839728654183' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8870685478574718863/posts/default/3444326839728654183'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8870685478574718863/posts/default/3444326839728654183'/><link rel='alternate' type='text/html' href='http://tahirhassan.blogspot.com/2011/09/emacs-setting-up-c-z-for-undo.html' title='Emacs - Setting up C-z for Undo'/><author><name>Tahir Hassan</name><uri>http://www.blogger.com/profile/15135167291149715079</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8870685478574718863.post-7248052225597291997</id><published>2011-08-25T14:11:00.001-07:00</published><updated>2011-08-25T14:39:35.119-07:00</updated><title type='text'>Common Text Operations in Emacs</title><content type='html'>&lt;h2&gt;Deleting text&lt;/h2&gt;
&lt;p&gt;
The two 'pure' deletion methods are using &lt;code&gt;backspace&lt;/code&gt; or &lt;code&gt;delete&lt;/code&gt; keys.  
The other way is to cut the text using the below method, regardless of the fact that it copies it to the clipboard.
&lt;/p&gt;

&lt;h2&gt;Cut, Copy and Paste&lt;/h2&gt;
&lt;p&gt;
To cut text, we first need to set a 'mark'. This is the start of the region of text that will be cut.  We then need 
to move the cursor to the end of the region and type &lt;code&gt;C-w&lt;/code&gt;.
&lt;/p&gt;
&lt;p&gt;
To copy text, we do exactly the same as we do for cutting, except we use &lt;code&gt;M-w&lt;/code&gt; instead of &lt;code&gt;C-w&lt;/code&gt;.
&lt;/p&gt;
&lt;p&gt;
To paste text we use &lt;code&gt;C-y&lt;/code&gt;.
&lt;/p&gt;
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8870685478574718863-7248052225597291997?l=tahirhassan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tahirhassan.blogspot.com/feeds/7248052225597291997/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8870685478574718863&amp;postID=7248052225597291997' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8870685478574718863/posts/default/7248052225597291997'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8870685478574718863/posts/default/7248052225597291997'/><link rel='alternate' type='text/html' href='http://tahirhassan.blogspot.com/2011/08/deleting-text-in-emacs.html' title='Common Text Operations in Emacs'/><author><name>Tahir Hassan</name><uri>http://www.blogger.com/profile/15135167291149715079</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8870685478574718863.post-3315728895733660379</id><published>2011-08-24T14:34:00.001-07:00</published><updated>2011-08-25T13:57:21.283-07:00</updated><title type='text'>Installing Emacs On Windows 7</title><content type='html'>&lt;p&gt;To install emacs...&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;
		&lt;p&gt;
			First download it from the official site:
		&lt;/p&gt;
		&lt;code&gt;http://ftp.gnu.org/pub/gnu/emacs/windows/&lt;/code&gt;
		&lt;p&gt;
			The one I downloaded was &lt;code&gt;emacs-23.3-bin-i386.zip&lt;/code&gt; but download the latest version.
		&lt;/p&gt;
	&lt;/li&gt;
	&lt;li&gt;
		&lt;p&gt;
			Within the zip file, I found a folder called &lt;code&gt;emacs-23.3&lt;/code&gt; which is replete with folders such as bin, etc and info etc.
			Copy &lt;code&gt;emacs-23.3&lt;/code&gt; to &lt;code&gt;C:\Program Files\&lt;/code&gt;.
		&lt;/p&gt;
	&lt;/li&gt;
	&lt;li&gt;
		&lt;p&gt;
			Now create a folder in &lt;code&gt;C:\Users\&amp;lt;My Name&amp;gt;\AppData\Roaming&lt;/code&gt; called &lt;code&gt;.emacs.d&lt;/code&gt;, 
			within it we want to create a file called &lt;code&gt;init.el&lt;/code&gt;.  This is the file that emacs reads when it loads up.
		&lt;/p&gt;
		&lt;p&gt;
			Add the following lines to init.el (Be sure to replace &lt;code&gt;&amp;lt;My Name&amp;gt;&lt;/code&gt;):
		&lt;/p&gt;
		&lt;script type='syntaxhighlighter' class='brush: c#; wrap-lines: false'&gt;
			(add-to-list 'load-path "/Users/&lt;My Name&gt;/AppData/Roaming/.emacs.d")
		&lt;/script&gt;
	&lt;/li&gt;
	&lt;li&gt;
		&lt;p&gt;
		Now it would be a good idea to make a shortcut to &lt;code&gt;C:\Program Files\emacs-23.3\bin\runemacs.exe&lt;/code&gt;.
		&lt;/p&gt;
	&lt;/li&gt;
	&lt;li&gt;
		&lt;p&gt;
		&lt;strong&gt;EDIT: &lt;/strong&gt;  later when I tried using the application is came up with a curious error message:
		&lt;/p&gt;
		&lt;code&gt;Error (initialization): User  has no home directory&lt;/code&gt;
		&lt;p&gt;
		Due to this, I created a laucher batch script containing the following text:
		&lt;/p&gt;
		&lt;script type='syntaxhighlighter' class='brush: plain'&gt;
		SET HOME=c:\Users\Tahir\AppData\Roaming\
		"C:\Program Files\emacs-23.3\bin\runemacs.exe"
		EXIT
		&lt;/script&gt;
		&lt;p&gt;
		This batch script sets up the &lt;code&gt;HOME&lt;/code&gt; to be that &lt;code&gt;Roaming&lt;/code&gt; directory wherein we 
		created the &lt;code&gt;.emacs.d&lt;/code&gt; folder.
		&lt;/p&gt;
	&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You have finished installing the application!&lt;/p&gt;

&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8870685478574718863-3315728895733660379?l=tahirhassan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tahirhassan.blogspot.com/feeds/3315728895733660379/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8870685478574718863&amp;postID=3315728895733660379' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8870685478574718863/posts/default/3315728895733660379'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8870685478574718863/posts/default/3315728895733660379'/><link rel='alternate' type='text/html' href='http://tahirhassan.blogspot.com/2011/08/installing-emacs-on-windows-7.html' title='Installing Emacs On Windows 7'/><author><name>Tahir Hassan</name><uri>http://www.blogger.com/profile/15135167291149715079</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8870685478574718863.post-6453156495383048206</id><published>2011-07-20T08:59:00.000-07:00</published><updated>2011-07-25T08:49:14.268-07:00</updated><title type='text'>Getting Column Names From SQL Server</title><content type='html'>&lt;p&gt;
To retrieve information about columns of a table in SQL Server you need to excecute the &lt;code&gt;sp_columns&lt;/code&gt; stored procedure (example is using &lt;code&gt;Project&lt;/code&gt; table):
&lt;/p&gt;

&lt;script type='syntaxhighlighter' class='brush: sql; wrap-lines: false'&gt;
sp_columns @table_name='Project'
&lt;/script&gt;

&lt;p&gt;
Running this &lt;code&gt;sp&lt;/code&gt; gives you more information than you want. You are only interested in the COLUMN_NAME column in the result.  To get only COLUMN_NAME you need to use &lt;code&gt;OPENROWSET&lt;/code&gt; as below:
&lt;/p&gt;

&lt;script type='syntaxhighlighter' class='brush: sql; wrap-lines: false'&gt;
SELECT t.COLUMN_NAME 
FROM OPENROWSET(
 'SQLNCLI', 
 'Server=ITSSQLDEV01;Trusted_Connection=yes;Database=WorkPlanning', 
 'exec sp_columns @table_name=''Project''') AS t;
&lt;/script&gt;

&lt;p&gt;
The only inelegant aspect of this solution is that we are passing as an argument, the same connection string which we used to connect to the database server in the first place, to &lt;code&gt;OPENROWSET&lt;/code&gt;.
&lt;/p&gt;

&lt;p&gt;Another method, which does not require &lt;code&gt;OPENROWSET&lt;/code&gt; is as follows:&lt;/p&gt;
&lt;script type='syntaxhighlighter' class='brush: sql; wrap-lines: false'&gt;
SELECT COLUMN_NAME
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = 'Resource'
ORDER BY ORDINAL_POSITION
&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8870685478574718863-6453156495383048206?l=tahirhassan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tahirhassan.blogspot.com/feeds/6453156495383048206/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8870685478574718863&amp;postID=6453156495383048206' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8870685478574718863/posts/default/6453156495383048206'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8870685478574718863/posts/default/6453156495383048206'/><link rel='alternate' type='text/html' href='http://tahirhassan.blogspot.com/2011/07/getting-column-names-from-sql-server.html' title='Getting Column Names From SQL Server'/><author><name>Tahir Hassan</name><uri>http://www.blogger.com/profile/15135167291149715079</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8870685478574718863.post-7492929934434727556</id><published>2011-05-16T02:48:00.000-07:00</published><updated>2011-05-16T03:12:37.496-07:00</updated><title type='text'>Current State of Modeless Editing (Version Control)</title><content type='html'>&lt;p&gt;
This is the change control of the ModelessEditing.ahk file.
&lt;/p&gt;
&lt;p&gt;
The most recent is at the top, so it is in descending order.
&lt;/p&gt;

&lt;script type='syntaxhighlighter' class='brush: ahk'&gt;&lt;![CDATA[
;
; AutoHotkey Version: 1.x
; Language:       English
; Platform:       Win9x/NT
; Author:         A.N.Other &lt;myemail@nowhere.com&gt;
;
; Script Function:
; Template script (you can customize this template by editing "ShellNew\Template.ahk" in your Windows folder)
;

#Persistent
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
#InstallKeybdHook
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
DetectHiddenWindows On 
SetTitleMatchMode 2 

SetCapsLockState, alwaysoff


^d:: Send {Delete}
^e:: Send {Enter}

Capslock &amp; j:: Send {Left}
Capslock &amp; l:: Send {Right}
Capslock &amp; k:: Send {Down}
Capslock &amp; i:: Send {Up}

/* The following is new */
Pause:: Send ^x
PgUp:: Send ^c
PgDn:: Send ^v

;CapsLock &amp; d::Delete
;CapsLock &amp; e::Enter

;CapsLock &amp; k::Down
;CapsLock &amp; i::Up
]]&gt;&lt;/script&gt;

&lt;p&gt;XXXXXXXXXXXXXXXXXXXXXXXXXXX&lt;p&gt;
&lt;script type='syntaxhighlighter' class='brush: ahk'&gt;&lt;![CDATA[
;
; AutoHotkey Version: 1.x
; Language:       English
; Platform:       Win9x/NT
; Author:         A.N.Other &lt;myemail@nowhere.com&gt;
;
; Script Function:
; Template script (you can customize this template by editing "ShellNew\Template.ahk" in your Windows folder)
;

#Persistent
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
#InstallKeybdHook
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
DetectHiddenWindows On 
SetTitleMatchMode 2 

SetCapsLockState, alwaysoff


^d:: Send {Delete}
^e:: Send {Enter}

Capslock &amp; j:: Send {Left}
Capslock &amp; l:: Send {Right}
Capslock &amp; k:: Send {Down}
Capslock &amp; i:: Send {Up}

;CapsLock &amp; d::Delete
;CapsLock &amp; e::Enter

;CapsLock &amp; k::Down
;CapsLock &amp; i::Up
]]&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8870685478574718863-7492929934434727556?l=tahirhassan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tahirhassan.blogspot.com/feeds/7492929934434727556/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8870685478574718863&amp;postID=7492929934434727556' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8870685478574718863/posts/default/7492929934434727556'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8870685478574718863/posts/default/7492929934434727556'/><link rel='alternate' type='text/html' href='http://tahirhassan.blogspot.com/2011/05/current-state-of-modeless-editing.html' title='Current State of Modeless Editing (Version Control)'/><author><name>Tahir Hassan</name><uri>http://www.blogger.com/profile/15135167291149715079</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8870685478574718863.post-74906516137003080</id><published>2011-02-03T09:26:00.001-08:00</published><updated>2011-02-03T09:38:37.799-08:00</updated><title type='text'>Debugging MVC App under IIS</title><content type='html'>&lt;p&gt;
Sometimes you need to debug an application but because of certain techniques, you MUST host your application under IIS rather than using the in-built Visual Studio web server.
&lt;p/&gt;
&lt;p&gt;
Once you create your virtual directory under IIS you need to create a Wildcard mapping to point to (for .NET version 4):
&lt;script type='syntaxhighlighter' class='brush: plain'&gt;
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll
&lt;/script&gt;
For anything other than .NET version 4:
&lt;script type='syntaxhighlighter' class='brush: plain'&gt;
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll
&lt;/script&gt;

And then untick &lt;b&gt;Check that file exists&lt;/b&gt;.
&lt;p/&gt;
&lt;p&gt;
Next you need to make sure that &lt;b&gt;Integrated Windows authentication&lt;/b&gt; is enabled through the &lt;b&gt;Directory Security&lt;/b&gt; tab.
&lt;p/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8870685478574718863-74906516137003080?l=tahirhassan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tahirhassan.blogspot.com/feeds/74906516137003080/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8870685478574718863&amp;postID=74906516137003080' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8870685478574718863/posts/default/74906516137003080'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8870685478574718863/posts/default/74906516137003080'/><link rel='alternate' type='text/html' href='http://tahirhassan.blogspot.com/2011/02/debugging-mvc-app-under-iis.html' title='Debugging MVC App under IIS'/><author><name>Tahir Hassan</name><uri>http://www.blogger.com/profile/15135167291149715079</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8870685478574718863.post-3028242593715579422</id><published>2010-11-03T04:14:00.000-07:00</published><updated>2010-11-03T06:58:20.297-07:00</updated><title type='text'>JQuery Context Menu</title><content type='html'>&lt;p&gt;
I have had a look at many JQuery context menu plugins and all of them are incredibly inflexible.  For example &lt;a href="http://abeautifulsite.net/blog/2008/09/jquery-context-menu-plugin/"&gt;jQuery.contextMenu&lt;/a&gt; can only be used for right clicks only, and can only show an unordered list as opposed to any html.
&lt;/p&gt;
&lt;p&gt;
What I have found is that JQuery UI's Dialog is sufficient to create any arbitrary context menu as all we need to do is bind to the "contextmenu" event and show a dialog.  Secondly JQuery UI Dialog will handle all the sizing and positioning (although you need to provide it with the viewport x and y coordinates). 
&lt;/p&gt;
&lt;p&gt;
Below is a little plugin that I have devised which defines two JQuery functions; one called &lt;b&gt;setUpContextMenu&lt;/b&gt; which essentially creates a JQuery UI Dialog and keeps it closed by using &lt;code&gt;{ autoOpen: false }&lt;/code&gt; option.  The second function called &lt;b&gt;openContextMenu&lt;/b&gt; will display the context menu and will 
close the dialog if the user clicks outside the context menu:
&lt;/p&gt;
&lt;script type='syntaxhighlighter' class='brush: js'&gt;&lt;![CDATA[
(function($) {
    $.fn.setUpContextMenu = function() {
        $(this).dialog({
            autoOpen: false,
            modal: true,
            resizable: false,
            width: 'auto',
            height: 'auto',
            minHeight: 'auto',
            minWidth: 'auto'
        });

        return $(this);
    };

    $.fn.openContextMenu = function(jsEvent) {
        var menu = $(this);
        menu.css('padding', 0);

        menu.dialog('option', 'position', [jsEvent.clientX, jsEvent.clientY]);
        menu.unbind('dialogopen');
        menu.bind('dialogopen', function(event, ui) {
            $('.ui-dialog-titlebar').hide();
            $('.ui-widget-overlay').unbind('click');
            $('.ui-widget-overlay').css('opacity', 0);
            $('.ui-widget-overlay').click(function() {
                menu.dialog('close');
            });
        });
        menu.dialog('open');

        return menu;
    };
})(jQuery); 
]]&gt;&lt;/script&gt;
&lt;p&gt;
All in all, only 34 lines of code.
&lt;/p&gt;
&lt;p&gt;
Let's go through an example.  Imagine that you have a context menu div that contains four or so options which we will represent as links:
&lt;/p&gt;
&lt;script type='syntaxhighlighter' class='brush: html'&gt;
&lt;div id="context-menu"&gt;
  &lt;a href="javascript:void(0)" id="option1"&gt;Option 1&lt;/a&gt;
  &lt;a href="javascript:void(0)" id="option2"&gt;Option 2&lt;/a&gt;
  &lt;a href="javascript:void(0)" id="option3"&gt;Option 3&lt;/a&gt;
  &lt;a href="javascript:void(0)" id="option4"&gt;Option 4&lt;/a&gt;
&lt;/div&gt;
&lt;/script&gt;
&lt;p&gt;
Firstly we want to turn the links above into block elements and secondly turn them into JQuery UI Buttons:
&lt;/p&gt;
&lt;script type='syntaxhighlighter' class='brush: js'&gt;&lt;![CDATA[
$('#context-menu a').css('display', 'block').button();
]]&gt;&lt;/script&gt;
Next we want to turn the &lt;b&gt;context-menu&lt;/b&gt; div into a context menu on page load:
&lt;script type='syntaxhighlighter' class='brush: js'&gt;&lt;![CDATA[
$('#context-menu').setUpContextMenu();
]]&gt;&lt;/script&gt;
Thirdly we want to bind the &lt;code&gt;contextmenu&lt;/code&gt; event of the &lt;code&gt;document&lt;/code&gt; to show the &lt;b&gt;context-menu&lt;/b&gt; div, so that it shows whenever the body is right clicked:
&lt;script type='syntaxhighlighter' class='brush: js'&gt;&lt;![CDATA[
$(document).bind('contextmenu', function(e) {
   $('#context-menu').openContextMenu(e);
   return false;
});
]]&gt;&lt;/script&gt;
Thus when you right click you will see the following:
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_GBgf0WZMDuc/TNFqPjzq43I/AAAAAAAAACI/kaaTziri9Xc/s1600/contextMenuExample.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 398px; height: 188px;" src="http://4.bp.blogspot.com/_GBgf0WZMDuc/TNFqPjzq43I/AAAAAAAAACI/kaaTziri9Xc/s400/contextMenuExample.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5535322232557593458" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8870685478574718863-3028242593715579422?l=tahirhassan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tahirhassan.blogspot.com/feeds/3028242593715579422/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8870685478574718863&amp;postID=3028242593715579422' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8870685478574718863/posts/default/3028242593715579422'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8870685478574718863/posts/default/3028242593715579422'/><link rel='alternate' type='text/html' href='http://tahirhassan.blogspot.com/2010/11/jquery-context-menu.html' title='JQuery Context Menu'/><author><name>Tahir Hassan</name><uri>http://www.blogger.com/profile/15135167291149715079</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_GBgf0WZMDuc/TNFqPjzq43I/AAAAAAAAACI/kaaTziri9Xc/s72-c/contextMenuExample.JPG' height='72' width='72'/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8870685478574718863.post-6867491273409709415</id><published>2010-10-03T12:00:00.001-07:00</published><updated>2010-10-03T12:19:22.312-07:00</updated><title type='text'>Rendering Json in MVC</title><content type='html'>&lt;p&gt;
To render Json into an MVC view, you will need to use &lt;code&gt;System.Web.Script.Serialization.JavaScriptSerializer&lt;/code&gt; which MVC uses internally when you call JsonResult.
&lt;/p&gt;

Ideally what we would like to do is render a JSON object onto the page and then be able to refer to it through our script.  For this we must attach it to the &lt;code&gt;window&lt;/code&gt; object:
&lt;br/&gt;

&lt;script type='syntaxhighlighter' class='brush: c#'&gt;
public static void RenderJson(this HtmlHelper html, string name, object o)
{
    var startTag = "&lt;script type='text/javascript'&gt;";
    var endTag = "&amp;lt;/script&gt;";

    var jsonObj = new JavaScriptSerializer().Serialize(o);

    var decl = "window." + name + "=" + jsonObj + ";";

    var script = startTag
               + decl
               + endTag;

    html.ViewContext.HttpContext.Response.Write(script);
}
&lt;/script&gt;
Then in our views we can then render a specific object that was passed to it from the controller:
&lt;script type='syntaxhighlighter' class='brush: c#'&gt;
  &lt;% Html.RenderJson("persons", ViewData["PersonList"]); %&gt;
&lt;/script&gt;
Then in our Javascript, we can then refer to the object using the &lt;code&gt;window[object-name]&lt;/code&gt; property:
&lt;script type='syntaxhighlighter' class='brush: js'&gt;&lt;![CDATA[
    &lt;script type="text/javascript"&gt;
        alert(window.persons.length);
    &amp;lt;/script&gt;
]]&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8870685478574718863-6867491273409709415?l=tahirhassan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tahirhassan.blogspot.com/feeds/6867491273409709415/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8870685478574718863&amp;postID=6867491273409709415' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8870685478574718863/posts/default/6867491273409709415'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8870685478574718863/posts/default/6867491273409709415'/><link rel='alternate' type='text/html' href='http://tahirhassan.blogspot.com/2010/10/rendering-json-in-mvc.html' title='Rendering Json in MVC'/><author><name>Tahir Hassan</name><uri>http://www.blogger.com/profile/15135167291149715079</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8870685478574718863.post-2990165033184892507</id><published>2010-07-06T14:00:00.000-07:00</published><updated>2010-07-06T14:18:15.586-07:00</updated><title type='text'>XmlSerializer Helper class</title><content type='html'>&lt;p&gt;
A lot of the times, you will want to use C# in built XML (de-)serialization facilities in the exact same way: You begin with a object which you want to serialize and then you serialize it and then put the resulting string into the database, or alternatively you want to take an existing serialized object and deserialize to perform further actions with it.
&lt;/p&gt;
&lt;p&gt;
The following class is a wrapper written specifically for this purpose.  The contructor takes one or more type arguments (all of which may been to be serialized by this serializer) and then provides essentially two methods, one for serializing and one for deserializing.  Additional overloads have been written for XElement because I am using LINQ To SQL which uses the XElement class to represent an XML column.
&lt;/p&gt;
&lt;script type='syntaxhighlighter' class='brush: c#'&gt;
public class XmlSerializer
{
    System.Xml.Serialization.XmlSerializer serializer;

    public XmlSerializer(params Type[] types)
    {
        if (!types.Any()) throw new ArgumentException("specify at least one type", "types");
        var firstArg = types.First();
        var rest = types.Skip(1).ToArray();
        serializer = new System.Xml.Serialization.XmlSerializer(firstArg, rest);
    }

    public string SerializeToString(object o)
    {
        var writer = new StringWriter();
        serializer.Serialize(writer, o);
        return writer.ToString();
    }

    public XElement Serialize(object o)
    {
        return XElement.Parse(SerializeToString(o));
    }

    public object Deserialize(string serial)
    {
        StringReader reader = new StringReader(serial);
        return serializer.Deserialize(reader);
    }

    public object Deserialize(XElement serial)
    {
        return Deserialize(serial.ToString());
    }

    public T DeserializeTo&lt;T&gt;(string serial)
    {
        return (T)Deserialize(serial);
    }

    public T DeserializeTo&lt;T&gt;(XElement serial)
    {
        return (T)Deserialize(serial);
    }
}
&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8870685478574718863-2990165033184892507?l=tahirhassan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tahirhassan.blogspot.com/feeds/2990165033184892507/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8870685478574718863&amp;postID=2990165033184892507' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8870685478574718863/posts/default/2990165033184892507'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8870685478574718863/posts/default/2990165033184892507'/><link rel='alternate' type='text/html' href='http://tahirhassan.blogspot.com/2010/07/xmlserializer-helper-class.html' title='XmlSerializer Helper class'/><author><name>Tahir Hassan</name><uri>http://www.blogger.com/profile/15135167291149715079</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8870685478574718863.post-9086823007516401883</id><published>2010-06-16T03:32:00.000-07:00</published><updated>2010-06-18T08:54:19.080-07:00</updated><title type='text'>NullsLast Extension method for Property Name</title><content type='html'>Continuing on from my previous post regarding sorting a column by putting the nulls at the end rather than at the beginning, I have found a need to write a NullsLast extension method that takes a string which represents the property's name instead of an expression which represents the property.  This was needed for use with MvcContrib's Html Grid for which one can use the OrderBy extension method found in MvcContrib.Sorting namespace.  

The way that you would want to use the extension method would be to specify the name of the property as a string:
&lt;script type='syntaxhighlighter' class='brush: c#; wrap-lines: false'&gt;
projects.OrderBy("Name", SortDirection.Ascending).NullsLast("Name");
&lt;/script&gt;

It turns out that this method's definition is very similar to the definition of earlier NullsLast Definition with the exception that we need to use reflection to get the PropertyInfo using the property name string parameter.  We then proceed as usual to construct a equals expression using the property and the null constant and then call OrderBy with the newly constructed &lt;code&gt;(x =&gt; x.property == null)&lt;/code&gt; expression:

&lt;script type='syntaxhighlighter' class='brush: c#'&gt;
public static IQueryable&lt;TSource&gt; NullsLast&lt;TSource&gt;(this IQueryable&lt;TSource&gt; query, string propertyName)
{
    if (string.IsNullOrEmpty(propertyName)) return query;

    var type = typeof(TSource);
    var property = type.GetProperty(propertyName);

    if (property == null)
    {
        throw new InvalidOperationException(string.Format("Could not find a property called '{0}' on type {1}", propertyName, type));
    }

    if (!property.PropertyType.IsClass &amp;&amp; !property.PropertyType.IsGenericType)
    {
        return query;
    }

    var nullExpr = Expression.Constant(null);
    var parameter = Expression.Parameter(type, "p");
    var propertyAccess = Expression.MakeMemberAccess(parameter, property);
    var equalExpr = Expression.Equal(propertyAccess, nullExpr);
    var lamdba = Expression.Lambda&lt;Func&lt;TSource, bool&gt;&gt;(equalExpr, parameter);
    return query.OrderBy(lamdba);
}
&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8870685478574718863-9086823007516401883?l=tahirhassan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tahirhassan.blogspot.com/feeds/9086823007516401883/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8870685478574718863&amp;postID=9086823007516401883' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8870685478574718863/posts/default/9086823007516401883'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8870685478574718863/posts/default/9086823007516401883'/><link rel='alternate' type='text/html' href='http://tahirhassan.blogspot.com/2010/06/nullslast-extension-method-for-property.html' title='NullsLast Extension method for Property Name'/><author><name>Tahir Hassan</name><uri>http://www.blogger.com/profile/15135167291149715079</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8870685478574718863.post-8615762969636311100</id><published>2010-06-16T03:18:00.000-07:00</published><updated>2010-06-16T03:32:27.524-07:00</updated><title type='text'>MVC Html Grid Sorting by Composite Column</title><content type='html'>Sometimes when using MvcContrib's Grid feature you may end up with columns which are a composite of two or more properties or you might have formatting in the expression.  For example, you may have the following:

&lt;script type='syntaxhighlighter' class='brush: c#; wrap-lines: false'&gt;
  column.For(x =&gt; x.Name + ": " + x.Description);
&lt;/script&gt;

For such expressions, although the content generated is correct, it does not include a "Column" parameter on the column header link to sort the column.  For the above example, we would naturally want to sort by the Name rather than the Description.  It would be useful to have an extension method on IGridColumn&lt;T&gt; which could be called as follows:

&lt;script type='syntaxhighlighter' class='brush: c#; wrap-lines: false'&gt;
  column.For(x =&gt; x.Name + ": " + x.Description).SortableAs(x =&gt; x.Name);
&lt;/script&gt;

The above extension method was quite easy to write but since the author has made the GridColumn&lt;T&gt;.Name property with only a get accessor and no set, I had to use reflection in order to retrieve the underlying field and then set it:

&lt;script type='syntaxhighlighter' class='brush: c#; wrap-lines: false'&gt;
public static class GridExtensions
{
    public static IGridColumn&lt;TModel&gt; SortableAs&lt;TModel, TProperty&gt;(this IGridColumn&lt;TModel&gt; column, Expression&lt;Func&lt;TModel, TProperty&gt;&gt; propertySpecifier) where TModel: class
    {
        var propertyName = ExpressionHelper.GetExpressionText(propertySpecifier);
        return column.SortableAs(propertyName);
    }

    public static IGridColumn&lt;TModel&gt; SortableAs&lt;TModel&gt;(this IGridColumn&lt;TModel&gt; column, string propertyName) where TModel : class
    {
        var _nameField = typeof(GridColumn&lt;TModel&gt;).GetField("_name", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance);
        _nameField.SetValue(column, propertyName);
        return column;
    }
}
&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8870685478574718863-8615762969636311100?l=tahirhassan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tahirhassan.blogspot.com/feeds/8615762969636311100/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8870685478574718863&amp;postID=8615762969636311100' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8870685478574718863/posts/default/8615762969636311100'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8870685478574718863/posts/default/8615762969636311100'/><link rel='alternate' type='text/html' href='http://tahirhassan.blogspot.com/2010/06/mvc-html-grid-sorting-by-composite.html' title='MVC Html Grid Sorting by Composite Column'/><author><name>Tahir Hassan</name><uri>http://www.blogger.com/profile/15135167291149715079</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8870685478574718863.post-3980563776874500256</id><published>2010-06-14T13:13:00.000-07:00</published><updated>2010-06-14T13:30:45.471-07:00</updated><title type='text'>MVC: SelectListFor extension method bug for Indexed Values</title><content type='html'>&lt;p&gt;
At my current company I am using the MVC Framework.  Although it is fairly mature, (I am using version 2), there are still loads of little bugs.  One such bug is the SelectListFor extension method which when given an indexed or indexer value, for example:
&lt;/p&gt;
&lt;p&gt;
&lt;script type='syntaxhighlighter' class='brush: c#; wrap-lines: false'&gt;
&lt;%= Html.DropDownListFor(x =&gt; x.Tasks[i].Name, selectList) %&gt;
&lt;/script&gt;
&lt;p&gt;
it will generate the correct html but the selected value of the drop down list is ignored on the first GET request.  On a POST request, since we receive a form value of the name "Tasks[0].Name", the extension method will then fill in the correct selected value since it can look this up.  However we are interested in solving the problem for the initial GET request.
&lt;/p&gt;
One problem I had with developing a solution was the fact that in the MVC source, everything is either internal or private, therefore I cannot reuse the MVC code, and instead I have to copy and paste huge chunks of it into my own application.  Another major drawback of this is that if there are any bug fixes within MVC, then my application will not benefit from them.  
&lt;/p&gt;&lt;p&gt;
Anyhow, the following class solves the problem.  The extension method is called "SelectListFor2" which is understandable because we do not want a naming conflict between our own extension method and Mvc's built in one:
&lt;/p&gt;
&lt;script type='syntaxhighlighter' class='brush: c#; wrap-lines: false'&gt;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Collections;
using System.Text;
using System.Globalization;
using System.Linq.Expressions;

namespace MyAppNameSpace.Mvc
{
    public static class SelectExtensions
    {
        public static MvcHtmlString DropDownListFor2&lt;TModel, TProperty&gt;(this HtmlHelper&lt;TModel&gt; htmlHelper, Expression&lt;Func&lt;TModel, TProperty&gt;&gt; expression, IEnumerable&lt;SelectListItem&gt; selectList)
        {
            return DropDownListFor2(htmlHelper, expression, selectList, null /* optionLabel */, null /* htmlAttributes */);
        }

        public static MvcHtmlString DropDownListFor2&lt;TModel, TProperty&gt;(this HtmlHelper&lt;TModel&gt; htmlHelper, Expression&lt;Func&lt;TModel, TProperty&gt;&gt; expression, IEnumerable&lt;SelectListItem&gt; selectList, string optionLabel, IDictionary&lt;string, object&gt; htmlAttributes)
        {
            if (expression == null)
            {
                throw new ArgumentNullException("expression");
            }
            var model = ModelMetadata.FromLambdaExpression(expression, htmlHelper.ViewData).Model;
            // return DropDownListHelper2(htmlHelper, ExpressionHelper.GetExpressionText(expression), selectList, optionLabel, htmlAttributes, model);

            return SelectInternal2(htmlHelper, optionLabel, ExpressionHelper.GetExpressionText(expression), selectList, false, htmlAttributes, model);
        }

        private static MvcHtmlString SelectInternal2(this HtmlHelper htmlHelper, string optionLabel, string name, IEnumerable&lt;SelectListItem&gt; selectList, bool allowMultiple, IDictionary&lt;string, object&gt; htmlAttributes, object model)
        {
            name = htmlHelper.ViewContext.ViewData.TemplateInfo.GetFullHtmlFieldName(name);
            if (String.IsNullOrEmpty(name))
            {
                throw new ArgumentException("name");
            }

            bool usedViewData = false;

            // If we got a null selectList, try to use ViewData to get the list of items.
            if (selectList == null)
            {
                selectList = htmlHelper.GetSelectData(name);
                usedViewData = true;
            }

            object defaultValue = (allowMultiple) ? htmlHelper.GetModelStateValue(name, typeof(string[])) : htmlHelper.GetModelStateValue(name, typeof(string));

            // If we haven't already used ViewData to get the entire list of items then we need to
            // use the ViewData-supplied value before using the parameter-supplied value.
            if (!usedViewData)
            {
                if (defaultValue == null)
                {
                    defaultValue = htmlHelper.ViewData.Eval(name);
                    if (defaultValue == null)
                    {
                        defaultValue = model;
                    }
                }
            }

            if (defaultValue != null)
            {
                IEnumerable defaultValues = (allowMultiple) ? defaultValue as IEnumerable : new[] { defaultValue };
                IEnumerable&lt;string&gt; values = from object value in defaultValues select Convert.ToString(value, CultureInfo.CurrentCulture);
                HashSet&lt;string&gt; selectedValues = new HashSet&lt;string&gt;(values, StringComparer.OrdinalIgnoreCase);
                List&lt;SelectListItem&gt; newSelectList = new List&lt;SelectListItem&gt;();

                foreach (SelectListItem item in selectList)
                {
                    item.Selected = (item.Value != null) ? selectedValues.Contains(item.Value) : selectedValues.Contains(item.Text);
                    newSelectList.Add(item);
                }
                selectList = newSelectList;
            }

            // Convert each ListItem to an &lt;option&gt; tag
            StringBuilder listItemBuilder = new StringBuilder();

            // Make optionLabel the first item that gets rendered.
            if (optionLabel != null)
            {
                listItemBuilder.AppendLine(ListItemToOption(new SelectListItem() { Text = optionLabel, Value = String.Empty, Selected = false }));
            }

            foreach (SelectListItem item in selectList)
            {
                listItemBuilder.AppendLine(ListItemToOption(item));
            }

            TagBuilder tagBuilder = new TagBuilder("select")
            {
                InnerHtml = listItemBuilder.ToString()
            };
            tagBuilder.MergeAttributes(htmlAttributes);
            tagBuilder.MergeAttribute("name", name, true /* replaceExisting */);
            tagBuilder.GenerateId(name);
            if (allowMultiple)
            {
                tagBuilder.MergeAttribute("multiple", "multiple");
            }

            // If there are any errors for a named field, we add the css attribute.
            ModelState modelState;
            if (htmlHelper.ViewData.ModelState.TryGetValue(name, out modelState))
            {
                if (modelState.Errors.Count &gt; 0)
                {
                    tagBuilder.AddCssClass(HtmlHelper.ValidationInputCssClassName);
                }
            }

            return tagBuilder.ToMvcHtmlString(TagRenderMode.Normal);
        }

        internal static string ListItemToOption(SelectListItem item)
        {
            TagBuilder builder = new TagBuilder("option")
            {
                InnerHtml = HttpUtility.HtmlEncode(item.Text)
            };
            if (item.Value != null)
            {
                builder.Attributes["value"] = item.Value;
            }
            if (item.Selected)
            {
                builder.Attributes["selected"] = "selected";
            }
            return builder.ToString(TagRenderMode.Normal);
        }

        public static MvcHtmlString ToMvcHtmlString(this TagBuilder tagBuilder, TagRenderMode renderMode)
        {
            return MvcHtmlString.Create(tagBuilder.ToString(renderMode));
        }

        private static IEnumerable&lt;SelectListItem&gt; GetSelectData(this HtmlHelper htmlHelper, string name)
        {
            object o = null;
            if (htmlHelper.ViewData != null)
            {
                o = htmlHelper.ViewData.Eval(name);
            }
            if (o == null)
            {
                throw new InvalidOperationException();
                //throw new InvalidOperationException(
                //    String.Format(
                //        CultureInfo.CurrentUICulture,
                //        MvcResources.HtmlHelper_MissingSelectData,
                //        name,
                //        "IEnumerable&lt;SelectListItem&gt;"));
            }
            IEnumerable&lt;SelectListItem&gt; selectList = o as IEnumerable&lt;SelectListItem&gt;;
            if (selectList == null)
            {
                throw new InvalidOperationException();
                //throw new InvalidOperationException(
                //    String.Format(
                //        CultureInfo.CurrentUICulture,
                //        MvcResources.HtmlHelper_WrongSelectDataType,
                //        name,
                //        o.GetType().FullName,
                //        "IEnumerable&lt;SelectListItem&gt;"));
            }
            return selectList;
        }

        public static object GetModelStateValue(this HtmlHelper htmlHelper, string key, Type destinationType)
        {
            ModelState modelState;
            if (htmlHelper.ViewData.ModelState.TryGetValue(key, out modelState))
            {
                if (modelState.Value != null)
                {
                    return modelState.Value.ConvertTo(destinationType, null /* culture */);
                }
            }
            return null;
        }
    }
}
&lt;/script&gt;

You would then use it by adding the relevant namespace into your web.config file and then using it as:

&lt;script type='syntaxhighlighter' class='brush: c#; wrap-lines: false'&gt;
&lt;%= Html.DropDownListFor2(x =&gt; x.Tasks[i].Name, selectList) %&gt;
&lt;/script&gt;

(Notice the 2).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8870685478574718863-3980563776874500256?l=tahirhassan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tahirhassan.blogspot.com/feeds/3980563776874500256/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8870685478574718863&amp;postID=3980563776874500256' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8870685478574718863/posts/default/3980563776874500256'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8870685478574718863/posts/default/3980563776874500256'/><link rel='alternate' type='text/html' href='http://tahirhassan.blogspot.com/2010/06/mvc-selectlistfor-extension-method-bug.html' title='MVC: SelectListFor extension method bug for Indexed Values'/><author><name>Tahir Hassan</name><uri>http://www.blogger.com/profile/15135167291149715079</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8870685478574718863.post-4187458266364358038</id><published>2010-06-02T15:12:00.000-07:00</published><updated>2010-06-02T15:22:26.829-07:00</updated><title type='text'>Linq to Sql: Order By Nulls Last</title><content type='html'>&lt;p&gt;
In SQL Server if you use "ORDER BY", you will get null values first.  However this is not the intention of the end user who wants to see items with values in those columns.
&lt;/p&gt;
&lt;p&gt;
Especially in LINQ to SQL, there is no extension method where we can easily do this.  The only way is a cumbersome
&lt;/p&gt;

&lt;script type='syntaxhighlighter' class='brush: c#; wrap-lines: false'&gt;
  Objects.OrderBy(x =&gt; x.Property == null)
         .ThenBy(x =&gt; x.Property);
&lt;/script&gt;

&lt;p&gt;
Which gets cumbersome after a point, especially when you forget to do it and then have to hunt for the code which does the ordering.
&lt;/p&gt;

The solution is surprisingly simple.  We want to be able to call it as:

&lt;script type='syntaxhighlighter' class='brush: c#; wrap-lines: false'&gt;
  Objects.OrderByNullsLast(x =&gt; x.Property);
&lt;/script&gt;

&lt;p&gt;
I have defined two extension methods which do so, one called &lt;var&gt;NullsLast&lt;/var&gt; which makes sure that those objects with null values will appear last, and the other &lt;var&gt;OrderByNullsLast&lt;/var&gt; which orders the collection and which puts the null values at the end:
&lt;/p&gt;

&lt;script type='syntaxhighlighter' class='brush: c#; wrap-lines: false'&gt;
public static IQueryable&lt;TSource&gt; OrderByNullsLast&lt;TSource, TKey&gt;(this IQueryable&lt;TSource&gt; query, Expression&lt;Func&lt;TSource, TKey&gt;&gt; keySelector)
{
    return query.OrderBy(keySelector).NullsLast(keySelector);
}


public static IQueryable&lt;TSource&gt; NullsLast&lt;TSource, TKey&gt;(this IQueryable&lt;TSource&gt; query, Expression&lt;Func&lt;TSource, TKey&gt;&gt; keySelector)
{
    var nullExpr = Expression.Constant(null, typeof(TKey));
    var equalExpr = Expression.Equal(keySelector.Body, nullExpr);
    var lambda = Expression.Lambda&lt;Func&lt;TSource, bool&gt;&gt;(equalExpr, keySelector.Parameters);
    return query.OrderBy(lambda);
}
&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8870685478574718863-4187458266364358038?l=tahirhassan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tahirhassan.blogspot.com/feeds/4187458266364358038/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8870685478574718863&amp;postID=4187458266364358038' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8870685478574718863/posts/default/4187458266364358038'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8870685478574718863/posts/default/4187458266364358038'/><link rel='alternate' type='text/html' href='http://tahirhassan.blogspot.com/2010/06/linq-to-sql-order-by-nulls-last.html' title='Linq to Sql: Order By Nulls Last'/><author><name>Tahir Hassan</name><uri>http://www.blogger.com/profile/15135167291149715079</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8870685478574718863.post-4464955794846465076</id><published>2010-05-13T09:40:00.000-07:00</published><updated>2010-05-13T09:46:15.160-07:00</updated><title type='text'>Deletion Auditing Trigger in SQL Server</title><content type='html'>&lt;p&gt;To audit deletions of rows in a SQL Server database, you can use a trigger to log the xml of the table row to a deleted rows table:&lt;/p&gt;


&lt;script type='syntaxhighlighter' class='brush: sql; wrap-lines: false'&gt;
CREATE TRIGGER Project_Delete ON Project FOR DELETE AS
 declare  @rowXml xml
 set @rowXml = (SELECT * FROM Deleted FOR XML AUTO, TYPE, ELEMENTS)
 INSERT INTO DeletedRow(RowXml)
 values(@rowXml)
GO
&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8870685478574718863-4464955794846465076?l=tahirhassan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tahirhassan.blogspot.com/feeds/4464955794846465076/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8870685478574718863&amp;postID=4464955794846465076' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8870685478574718863/posts/default/4464955794846465076'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8870685478574718863/posts/default/4464955794846465076'/><link rel='alternate' type='text/html' href='http://tahirhassan.blogspot.com/2010/05/deletion-auditing-trigger-in-sql-server.html' title='Deletion Auditing Trigger in SQL Server'/><author><name>Tahir Hassan</name><uri>http://www.blogger.com/profile/15135167291149715079</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8870685478574718863.post-2316287191217791926</id><published>2010-05-04T06:27:00.000-07:00</published><updated>2010-05-04T06:32:31.123-07:00</updated><title type='text'>Linq Exception: The null value cannot be assigned to a member with type System.Guid which is a non-nullable value type.</title><content type='html'>&lt;p&gt;This exception is caused by having a non-nullable field on an object but the database having a nullable field of the same name. &lt;/p&gt;

&lt;p&gt;For example, I had a class defined in the dbml called &lt;var&gt;Resource&lt;/var&gt; which had a System.Guid field called &lt;var&gt;TeamId&lt;/var&gt; but on the SQL Server, the Resource.TeamId field in fact allowed null values&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8870685478574718863-2316287191217791926?l=tahirhassan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tahirhassan.blogspot.com/feeds/2316287191217791926/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8870685478574718863&amp;postID=2316287191217791926' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8870685478574718863/posts/default/2316287191217791926'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8870685478574718863/posts/default/2316287191217791926'/><link rel='alternate' type='text/html' href='http://tahirhassan.blogspot.com/2010/05/linq-exception-null-value-cannot-be.html' title='Linq Exception: The null value cannot be assigned to a member with type System.Guid which is a non-nullable value type.'/><author><name>Tahir Hassan</name><uri>http://www.blogger.com/profile/15135167291149715079</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8870685478574718863.post-398413094072970486</id><published>2010-04-23T07:48:00.000-07:00</published><updated>2010-04-23T08:07:57.183-07:00</updated><title type='text'>Configuring an MVC Web App under IIS 6</title><content type='html'>&lt;p&gt;
To configure an MVC web application under IIS 6 you first need to create a virtual directory.  During the &lt;b&gt;Virtual Directory Creation Wizard&lt;/b&gt; you can leave the &lt;b&gt;Access Permission&lt;/b&gt; as it is (merely leave &lt;var&gt;Read&lt;/var&gt; and &lt;var&gt;Run Scripts&lt;/var&gt; ticked and ignore the other options).
&lt;/p&gt;
&lt;p&gt;
You must then change the options of the virtual directory.  Right click it and go into &lt;b&gt;Properties&lt;/b&gt;.  On the &lt;b&gt;Virtual Directory&lt;/b&gt; tab, click on the &lt;b&gt;Configuration&lt;/b&gt; button.  
&lt;/p&gt;
&lt;p&gt;
On the next screen, click &lt;b&gt;Add&lt;/b&gt;.  For the executable, set it to point to:
&lt;/p&gt;
&lt;script type='syntaxhighlighter' class='brush: plain'&gt;
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll
&lt;/script&gt;
&lt;p&gt;
Set the extension to &lt;code&gt;.*&lt;/code&gt; and untick &lt;b&gt;Check that file exists&lt;/b&gt;.
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8870685478574718863-398413094072970486?l=tahirhassan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tahirhassan.blogspot.com/feeds/398413094072970486/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8870685478574718863&amp;postID=398413094072970486' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8870685478574718863/posts/default/398413094072970486'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8870685478574718863/posts/default/398413094072970486'/><link rel='alternate' type='text/html' href='http://tahirhassan.blogspot.com/2010/04/configuring-mvc-web-app-under-iis-6.html' title='Configuring an MVC Web App under IIS 6'/><author><name>Tahir Hassan</name><uri>http://www.blogger.com/profile/15135167291149715079</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8870685478574718863.post-6531619770215172627</id><published>2010-04-22T04:28:00.000-07:00</published><updated>2010-04-26T09:01:27.762-07:00</updated><title type='text'>Using MvcContrib's Html Grid and Pager</title><content type='html'>&lt;p&gt;
To use MvcContrib's Html Grid and Pager you need to include references to both &lt;var&gt;Microsoft.Web.Mvc.dll&lt;/var&gt; and &lt;var&gt;MvcContrib.dll&lt;/var&gt; which are included in &lt;a href='http://mvccontrib.codeplex.com/'&gt;MvcContrib&lt;/a&gt;.  In your aspx file you need to include the following namespaces:
&lt;/p&gt;
&lt;script type='syntaxhighlighter' class='brush: c#; wrap-lines: false'&gt;
&lt;%@ Import Namespace="MvcContrib.UI.Pager" %&gt;
&lt;%@ Import Namespace="MvcContrib.UI.Grid" %&gt;
&lt;%@ Import Namespace="MvcContrib.UI.Grid.ActionSyntax" %&gt;
&lt;/script&gt;

&lt;p&gt;
For hyperlinks you will want to include a statement to &lt;var&gt;DoNotEncode&lt;/var&gt; on the column:
&lt;/p&gt;
&lt;script type='syntaxhighlighter' class='brush: c#'&gt;
column.For(x =&gt; "&lt;a href='javascript:void(0)'&gt;Some Link&lt;/a&gt;").DoNotEncode();
&lt;/script&gt;

&lt;p&gt;To apply attributes on the &lt;var&gt;td&lt;/var&gt; tag of a particular column then you can do so with a call to &lt;var&gt;Attributes&lt;/var&gt; extension method:
&lt;/p&gt;
&lt;script type='syntaxhighlighter' class='brush: c#'&gt;
column.For(x =&gt; x.Id).Attributes(style =&gt; "background-color: red", @class =&gt; "redCell");
&lt;/script&gt;

&lt;p&gt;
Occasionally you need access to the underlying object when deciding on the style of a table cell.  For example, you may want to highlight all unread items with the color &lt;var&gt;red&lt;/var&gt;:
&lt;/p&gt;
&lt;script type='syntaxhighlighter' class='brush: c#'&gt;
column.For(x =&gt; x.Description)
      .Attributes(row =&gt;
          new MvcContrib.Hash(style =&gt;
              {
                  if (!row.Item.IsRead) return "background-color: red";
                  else return "";
              }));
&lt;/script&gt;
&lt;p&gt; As you can see above, you can access the rows object by using &lt;var&gt;row.Item&lt;/var&gt;.
&lt;/p&gt;

&lt;p&gt;
You can find more information from &lt;a href='http://davidhayden.com/blog/dave/archive/2009/06/25/MvcContribGridPagerHelpers.aspx'&gt;David Hayden's blog&lt;/a&gt; and &lt;a href='http://www.jeremyskinner.co.uk/2009/02/08/rewriting-the-mvccontrib-grid/'&gt;Jerry Skinner's blog&lt;/a&gt;.
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8870685478574718863-6531619770215172627?l=tahirhassan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tahirhassan.blogspot.com/feeds/6531619770215172627/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8870685478574718863&amp;postID=6531619770215172627' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8870685478574718863/posts/default/6531619770215172627'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8870685478574718863/posts/default/6531619770215172627'/><link rel='alternate' type='text/html' href='http://tahirhassan.blogspot.com/2010/04/using-mvccontribs-html-grid-and-pager.html' title='Using MvcContrib&apos;s Html Grid and Pager'/><author><name>Tahir Hassan</name><uri>http://www.blogger.com/profile/15135167291149715079</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8870685478574718863.post-48015678754626470</id><published>2010-04-15T14:14:00.000-07:00</published><updated>2010-04-15T14:41:05.888-07:00</updated><title type='text'>Swapping Mouse Buttons with AutoHotKey</title><content type='html'>&lt;p&gt;To prevent repetitive strain injury, you may want to change the hand that you control your mouse with, frequently, like every hour or so.  Therefore you will want a quick method of swapping the left and right mouse buttons because changing the mouse options from the Control Panel takes too long.
&lt;/p&gt;
&lt;p&gt;An additional requirement could be that you want the mouse buttons to be swapped natively without mouse click interception.  The benefit of this would be that your mouse clicks are much faster and more reliable and this matters when playing games.&lt;/p&gt;
&lt;p&gt;
The only way of swapping mouse buttons without any overhead is to use the Win32 function &lt;a href='http://msdn.microsoft.com/en-us/library/ms646264%28VS.85%29.aspx'&gt;SwapMouseButton&lt;/a&gt;:
&lt;/p&gt;
&lt;script type='syntaxhighlighter' class='brush: c#; wrap-lines: false'&gt;
Swapped := DllCall("SwapMouseButton", Int, 0)
if Swapped = 0
 DllCall("SwapMouseButton", Int, 1)
&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8870685478574718863-48015678754626470?l=tahirhassan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tahirhassan.blogspot.com/feeds/48015678754626470/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8870685478574718863&amp;postID=48015678754626470' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8870685478574718863/posts/default/48015678754626470'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8870685478574718863/posts/default/48015678754626470'/><link rel='alternate' type='text/html' href='http://tahirhassan.blogspot.com/2010/04/swapping-mouse-buttons-with-autohotkey.html' title='Swapping Mouse Buttons with AutoHotKey'/><author><name>Tahir Hassan</name><uri>http://www.blogger.com/profile/15135167291149715079</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8870685478574718863.post-4709314593877550927</id><published>2010-03-23T14:07:00.001-07:00</published><updated>2010-03-24T12:01:04.628-07:00</updated><title type='text'>Adding Files and Folders / Directories to Google Sites</title><content type='html'>&lt;p&gt;
Although Google sites may not support FTP access and you certainly cannot upload files or folders to your Google site in the traditional way, you can have the &lt;b&gt;appearance&lt;/b&gt; of having added files and folders.
&lt;/p&gt;
&lt;p&gt;
To add a folder you first have to click "Create Page":
&lt;/p&gt;

&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_GBgf0WZMDuc/S6kzNANBxdI/AAAAAAAAAA0/zfQooDdXQaw/s1600-h/Untitled.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 63px;" src="http://1.bp.blogspot.com/_GBgf0WZMDuc/S6kzNANBxdI/AAAAAAAAAA0/zfQooDdXQaw/s400/Untitled.jpg" alt="" id="BLOGGER_PHOTO_ID_5451945122394654162" border="0" /&gt;&lt;/a&gt;
&lt;p&gt;
Then we specify to create a file cabinet, then we give the name of the folder, and then specify which folder we want it under.  For the example below I have it under the root (sites.google.com/site/tahassan/) so that the folder location would be sites.google.com/site/tahassan/folder1.
&lt;/p&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_GBgf0WZMDuc/S6k13ATIycI/AAAAAAAAABE/kx55YYWbGg8/s1600-h/Untitled2.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 315px;" src="http://4.bp.blogspot.com/_GBgf0WZMDuc/S6k13ATIycI/AAAAAAAAABE/kx55YYWbGg8/s400/Untitled2.jpg" alt="" id="BLOGGER_PHOTO_ID_5451948042998041026" border="0" /&gt;&lt;/a&gt;
&lt;p&gt;
To add a file under this folder1 we click on "Add File":
&lt;/p&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_GBgf0WZMDuc/S6k23XNRX-I/AAAAAAAAABM/HNFXSdwoa-I/s1600-h/Untitled3.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 207px;" src="http://2.bp.blogspot.com/_GBgf0WZMDuc/S6k23XNRX-I/AAAAAAAAABM/HNFXSdwoa-I/s400/Untitled3.jpg" alt="" id="BLOGGER_PHOTO_ID_5451949148659081186" border="0" /&gt;&lt;/a&gt;

&lt;p&gt;
Then adding a file is a very easy process.
&lt;/p&gt;

&lt;p&gt;
Let's say we wanted to add a folder under folder1, called "folder2"?  This is a very easy process.   We would click on "Create Page" (like in the first picture), then we would click on "Choose a different location", then we can specify the location to be folder1:
&lt;/p&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_GBgf0WZMDuc/S6k5mWRhrLI/AAAAAAAAABU/SSZZhMn6XbY/s1600-h/untitled4.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 356px; height: 400px;" src="http://2.bp.blogspot.com/_GBgf0WZMDuc/S6k5mWRhrLI/AAAAAAAAABU/SSZZhMn6XbY/s400/untitled4.JPG" alt="" id="BLOGGER_PHOTO_ID_5451952154885598386" border="0" /&gt;&lt;/a&gt;
&lt;p&gt;
Although this is not perfect, you can still use it to organise files into folders.
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8870685478574718863-4709314593877550927?l=tahirhassan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tahirhassan.blogspot.com/feeds/4709314593877550927/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8870685478574718863&amp;postID=4709314593877550927' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8870685478574718863/posts/default/4709314593877550927'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8870685478574718863/posts/default/4709314593877550927'/><link rel='alternate' type='text/html' href='http://tahirhassan.blogspot.com/2010/03/adding-files-and-folders-directories-to.html' title='Adding Files and Folders / Directories to Google Sites'/><author><name>Tahir Hassan</name><uri>http://www.blogger.com/profile/15135167291149715079</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_GBgf0WZMDuc/S6kzNANBxdI/AAAAAAAAAA0/zfQooDdXQaw/s72-c/Untitled.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8870685478574718863.post-1012825926030938549</id><published>2010-03-21T10:24:00.000-07:00</published><updated>2010-03-24T11:54:19.187-07:00</updated><title type='text'>Setting up Alex Gorbatchev's Syntax Highlighter on Blogger</title><content type='html'>Because my blog posts are essentially technical notes, I found a need to include code samples, especially in C#.  Currently, the syntax highlighter most in vogue is &lt;a href="http://alexgorbatchev.com/wiki/SyntaxHighlighter"&gt;Alex Gorbatchev's Syntax Highlighter&lt;/a&gt;.  Here is an example of what it is capable of:

&lt;script type="syntaxhighlighter" class="brush: c#; wrap-lines: false"&gt;
foreach (var str in new List&lt;string&gt; { "Hello", "World" })
{
   Console.Write(str);
   Console.Write(" ");
}
&lt;/script&gt;

&lt;p&gt;
I had a bit of trouble setting it all up as I have no real website to host the Syntax Highlighter source files.  Since I am a cheapskate, I ended up using Google Sites.  Be aware though, that Google Sites is slow so your blog may take longer to load.  If you do not want to go through the bother of uploading the source files you can instead use the files I have uploaded instead (as I describe below).
&lt;/p&gt;

&lt;p&gt;
Below are steps that you would need to follow in order to set it up on Blogger.
&lt;/p&gt;
&lt;p&gt;
1. Download the Syntax Highlighter source files and upload them to a location on the web. I am assuming that you have uploaded it to SITE/syntaxhighlighter where SITE is your website address. Inside the syntaxhighlighter folder you should have three sub-folders: scripts, styles and src. (I am using Syntax Highlighter 2.1.364).
&lt;/p&gt;
&lt;p&gt;
If you do not wish to upload the files yourself you can instead replace SITE with 

&lt;script type='syntaxhighlighter' class='brush: plain'&gt;
http://sites.google.com/site/tahassan 
&lt;/script&gt;

in what follows.
&lt;/p&gt;
&lt;p&gt;
2. In Blogger, click on Settings -&gt; Formatting and set "Convert Line Breaks" option to No.  
&lt;/p&gt;
&lt;p&gt;
3. In Blogger, click on Layout -&gt; Edit HTML.  Here you want to add the following under the &amp;lt;head&amp;gt; element:

&lt;script type='syntaxhighlighter' class='brush: xml; wrap-lines: false'&gt;
&lt;link href='SITE/syntaxhighlighter/styles/shCore.css' rel='stylesheet' type='text/css'/&gt;
&lt;link href='SITE/syntaxhighlighter/styles/shThemeDefault.css' rel='stylesheet' type='text/css'/&gt;
&lt;script src='SITE/syntaxhighlighter/scripts/shCore.js' type='text/javascript'/&gt;
&lt;script src='SITE/syntaxhighlighter/scripts/shBrushCSharp.js' type='text/javascript'/&gt;
&lt;script type='text/javascript'&gt;
  SyntaxHighlighter.config.clipboardSwf = 'SITE/syntaxhighlighter/scripts/clipboard.swf'; 
  SyntaxHighlighter.all(); 
&amp;lt;/script&amp;gt;
&lt;/script&gt;

(Replace SITE with the address of your actual site.)
&lt;/p&gt;

&lt;p&gt;
4. To write a code sample you merely have to write:

&lt;script type='syntaxhighlighter' class='brush: xml; wrap-lines: false'&gt;
&amp;lt;script type='syntaxhighlighter' class='brush: c#; wrap-lines: false'&amp;gt;
foreach (var str in new List&lt;string&gt; { "Hello", "World" })
{
   Console.Write(str);
   Console.Write(" ");
}
&amp;lt;/script&amp;gt;
&lt;/script&gt;
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8870685478574718863-1012825926030938549?l=tahirhassan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tahirhassan.blogspot.com/feeds/1012825926030938549/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8870685478574718863&amp;postID=1012825926030938549' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8870685478574718863/posts/default/1012825926030938549'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8870685478574718863/posts/default/1012825926030938549'/><link rel='alternate' type='text/html' href='http://tahirhassan.blogspot.com/2010/03/setting-up-alex-gorbatchevs-syntax.html' title='Setting up Alex Gorbatchev&apos;s Syntax Highlighter on Blogger'/><author><name>Tahir Hassan</name><uri>http://www.blogger.com/profile/15135167291149715079</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8870685478574718863.post-8658112406293770348</id><published>2010-03-21T05:12:00.000-07:00</published><updated>2010-03-24T11:59:24.107-07:00</updated><title type='text'>Extracting info From SqlException when attempted Deletion causes a Reference Violation</title><content type='html'>&lt;p&gt;
When you try to delete a row using LINQ to SQL using code similar to the following:

&lt;script type='syntaxhighlighter' class='brush: c#'&gt;
context.GetTable&lt;Category&gt;().DeleteOnSubmit(category);
&lt;/script&gt;

a SqlException can be thrown if this object has any child rows associated with it.
&lt;/p&gt;
&lt;p&gt;
I have written code below, which, given a SqlException, first tests whether it was thrown due to a reference constraint violation, and finds out the contraint name, the name of the table that the child row exists in, and the name of the column that acts as the foreign key:
&lt;/p&gt;
&lt;script type='syntaxhighlighter' class='brush: c#; wrap-lines: false'&gt;
try
{
   // do something here
}
catch (SqlException ex)
{
    var msg = ex.Message;
    if (msg.Contains("DELETE") &amp;&amp; msg.Contains("REFERENCE"))
    {
        var constraintName = Regex.Match(msg, "constraint \"([^\\\"]*)\"").Groups[1].Value;
        var tableName = Regex.Match(msg, "table \"dbo.([^\"]*)").Groups[1].Value;
        var column = Regex.Match(msg, "column '([^']*)").Groups[1].Value;
        // do something with this information now.
    }
}
&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8870685478574718863-8658112406293770348?l=tahirhassan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tahirhassan.blogspot.com/feeds/8658112406293770348/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8870685478574718863&amp;postID=8658112406293770348' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8870685478574718863/posts/default/8658112406293770348'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8870685478574718863/posts/default/8658112406293770348'/><link rel='alternate' type='text/html' href='http://tahirhassan.blogspot.com/2010/03/extracting-info-from-sqlexception-when.html' title='Extracting info From SqlException when attempted Deletion causes a Reference Violation'/><author><name>Tahir Hassan</name><uri>http://www.blogger.com/profile/15135167291149715079</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8870685478574718863.post-3082479447492513689</id><published>2010-03-02T10:22:00.000-08:00</published><updated>2010-03-24T11:58:42.585-07:00</updated><title type='text'>Re-Syncing subtitles with Subtitle Workshop</title><content type='html'>&lt;p&gt;
If you have a movie where the subtitle file that you downloaded is not in sync, then don't worry: there is an easy process to re synchronise them using a free program called "Subtitle Workshop".  Subtitle Workshop can be downloaded &lt;a href="http://www.urusoft.net/"&gt;here&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
To resync, follow the instructions below:
&lt;/p&gt;
&lt;p&gt;
1) Open Subtitle Workshop (the link can be found in "Start" -&gt; "All Programs" -&gt; "URUSoft" -&gt; "Subtitle Workshop").
&lt;/p&gt;
&lt;p&gt;
2) Open the video file by using ("Movie" -&gt; "Open")  and also open the the subtitle file by using "File" -&gt; "Load Subtitle".
&lt;/p&gt;
&lt;p&gt;
3) Play the movie (the play button is the left most button below) and pause it immediately when the speech begins.
&lt;/p&gt;
&lt;p&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_GBgf0WZMDuc/S41brpsM-zI/AAAAAAAAAAM/XA62XnUultM/s1600-h/SubtitleWorkshopControlBar.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 24px;" src="http://2.bp.blogspot.com/_GBgf0WZMDuc/S41brpsM-zI/AAAAAAAAAAM/XA62XnUultM/s320/SubtitleWorkshopControlBar.JPG" alt="" id="BLOGGER_PHOTO_ID_5444108330044554034" border="0" /&gt;&lt;/a&gt;You can find the length of the video already played by looking at the right of the above bar (the top value).
&lt;/p&gt;
&lt;p&gt;
4) You then note down when the first subtitle was played.  You can find this out by looking at the "Show" column in the table below the movie (look at the first row):
&lt;/p&gt;
&lt;p&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_GBgf0WZMDuc/S41t-HME08I/AAAAAAAAAAU/liySUsrCsFo/s1600-h/SubtitleWorkshopSubtitleTable.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 42px;" src="http://4.bp.blogspot.com/_GBgf0WZMDuc/S41t-HME08I/AAAAAAAAAAU/liySUsrCsFo/s320/SubtitleWorkshopSubtitleTable.JPG" alt="" id="BLOGGER_PHOTO_ID_5444128438409810882" border="0" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
5) Assuming that the subtitles are shown before the speech started then work out:
&lt;/p&gt;
&lt;p&gt;

&lt;script type='syntaxhighlighter' class='brush: plain'&gt;
Offset = (Time that speech starts) - (Time that first subtitle shown)
&lt;/script&gt;

&lt;/p&gt;
&lt;p&gt;
6) Once you have done this arithmetic, you can then use ("Edit" -&gt; "Timings" -&gt; "Set Delay") and then input this calculated offset and then hit ("File" -&gt; "Save"). Note that a back up of the subtitle file should be made before doing this.  This is the end of the process.
&lt;/p&gt;
&lt;p&gt;
If on the other hand, the subtitles are shown before the speech starts then we work out the offset by:
&lt;/p&gt;

&lt;script type='syntaxhighlighter' class='brush: plain'&gt;
Offset = (Time that first subtitle shown) - (Time that speech starts)
&lt;/script&gt;
&lt;p&gt;
Then we follow the same process to set the delay except that it should be minus (-):
&lt;/p&gt;
&lt;p&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_GBgf0WZMDuc/S41wP37vt1I/AAAAAAAAAAc/TB7s6Cap9s4/s1600-h/SubtitleWorkshopDelayDialog.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 282px; height: 191px;" src="http://2.bp.blogspot.com/_GBgf0WZMDuc/S41wP37vt1I/AAAAAAAAAAc/TB7s6Cap9s4/s320/SubtitleWorkshopDelayDialog.JPG" alt="" id="BLOGGER_PHOTO_ID_5444130942575687506" border="0" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8870685478574718863-3082479447492513689?l=tahirhassan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tahirhassan.blogspot.com/feeds/3082479447492513689/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8870685478574718863&amp;postID=3082479447492513689' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8870685478574718863/posts/default/3082479447492513689'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8870685478574718863/posts/default/3082479447492513689'/><link rel='alternate' type='text/html' href='http://tahirhassan.blogspot.com/2010/03/re-syncing-subtitles-with-subtitle.html' title='Re-Syncing subtitles with Subtitle Workshop'/><author><name>Tahir Hassan</name><uri>http://www.blogger.com/profile/15135167291149715079</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_GBgf0WZMDuc/S41brpsM-zI/AAAAAAAAAAM/XA62XnUultM/s72-c/SubtitleWorkshopControlBar.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8870685478574718863.post-7799698893448169370</id><published>2010-02-28T03:27:00.000-08:00</published><updated>2010-03-24T11:55:09.706-07:00</updated><title type='text'>Setting up an ASP .NET Web Application Project Under IIS for the First Time</title><content type='html'>&lt;p&gt;
Once you have created your website, you will want to deploy it.  To deploy it as a web application under IIS (Internet Information Services) do the following:
&lt;/p&gt;
&lt;p&gt;
1.  First install IIS if you already haven't done so.  Go to Start -&gt; Settings -&gt; Control Panel -&gt; Add or Remove Programs -&gt; Add/Remove Windows Components and then check Internet Information Services and click Next to install.
&lt;/p&gt;
&lt;p&gt;
2.  Secondly, if you already haven't done so, open a command prompt (to do this go to Start -&gt; Run and then type "cmd" and press enter.  Now type "aspnet_regiis.exe -i".  This will register the ASP .NET runtime as the executable for ASP .NET applications.
&lt;/p&gt;
&lt;p&gt;
3.  Now go into IIS (Start -&gt; Control Panel -&gt; Adminitrative Tools -&gt; Internet Information Services) and then in the left column expand the items (press the + button) until you see "Default Web Site".  Right click this and then select "new -&gt; Virtual Directory".    Type in a meaningful website name here when it prompts for the alias.  When prompted for the directory, browse to folder containing the web application project.  This folder should contain the project file, the web.config  and the bin directory.    For the access permissions make sure that the first three items are checked (Read, Run and Execute).
&lt;/p&gt;
&lt;p&gt;
4.  Now right click the folder containing the web application project in Windows explorer and select properties.  Go to the Security Tab.  You will need to add the ASPNET account to this list as well as an account named IUSR_MACHINE where MACHINE is the name of your machine.  If you dod not know your computer name, right click on the My Computer Icon on your desktop and then select properties.  Go to the "Computer Name" tab.  For both ASPNET and IUSR_MACHINE set the permissions to allow "Read, "Read &amp;amp; Execute" and "List Folder Contents".
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8870685478574718863-7799698893448169370?l=tahirhassan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tahirhassan.blogspot.com/feeds/7799698893448169370/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8870685478574718863&amp;postID=7799698893448169370' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8870685478574718863/posts/default/7799698893448169370'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8870685478574718863/posts/default/7799698893448169370'/><link rel='alternate' type='text/html' href='http://tahirhassan.blogspot.com/2010/02/setting-up-asp-net-web-application.html' title='Setting up an ASP .NET Web Application Project Under IIS for the First Time'/><author><name>Tahir Hassan</name><uri>http://www.blogger.com/profile/15135167291149715079</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8870685478574718863.post-6252142305857022695</id><published>2009-10-15T16:22:00.000-07:00</published><updated>2010-03-24T11:55:37.109-07:00</updated><title type='text'>ASUS M4A78-VM and Realtek sound</title><content type='html'>&lt;p&gt;
I  bought the ASUS M4A78-VM and tried to install Windows XP (32-bit) on it.  Every driver on the CD worked, except the sound driver.
&lt;/p&gt;
&lt;p&gt;
I searched Google for ages, but I figured it out in the end.  The way you go about it is as follows:
&lt;/p&gt;
&lt;p&gt;
Firstly remove existing HD Audio Drivers and the Realtek drivers: go to Start -&gt; Control Panel -&gt; Add / Remove Programs and uninstall the Realtek High Definition Audio Driver.  Secondly remove any High Definition Audio Drivers that are listed under "Sound, video and game controllers" in the Device Manager. Open this by doing Start -&gt; Run -&gt; type "devmgmt.msc" and enter.
&lt;/p&gt;
&lt;p&gt;
Go into the Device Manager.  You should see two "PCI Devices" with question marks on them.  Right click them and select "Update / Install Drivers" (or something to that effect).  This will "install" them.  Do this for both of the devices with the question marks.
&lt;/p&gt;
&lt;p&gt;
Lastly insert the motherboard CD and install the audio drivers.
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8870685478574718863-6252142305857022695?l=tahirhassan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tahirhassan.blogspot.com/feeds/6252142305857022695/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8870685478574718863&amp;postID=6252142305857022695' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8870685478574718863/posts/default/6252142305857022695'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8870685478574718863/posts/default/6252142305857022695'/><link rel='alternate' type='text/html' href='http://tahirhassan.blogspot.com/2009/10/asus-m4a78-vm-and-realtek-sound.html' title='ASUS M4A78-VM and Realtek sound'/><author><name>Tahir Hassan</name><uri>http://www.blogger.com/profile/15135167291149715079</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
