<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://weblogs.asp.net/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><title type="html">On the road again...</title><subtitle type="html">The life of a .NET commuter.</subtitle><id>http://weblogs.asp.net/kyleholder/atom.aspx</id><link rel="alternate" type="text/html" href="http://weblogs.asp.net/kyleholder/default.aspx" /><link rel="self" type="application/atom+xml" href="http://weblogs.asp.net/kyleholder/atom.aspx" /><generator uri="http://communityserver.org" version="3.0.20510.895">Community Server</generator><updated>2008-01-22T15:06:00Z</updated><entry><title>A "Web 2.0" background stripe generator.</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/kyleholder/archive/2008/09/03/a-quot-web-2-0-quot-background-stripe-generator.aspx" /><id>http://weblogs.asp.net/kyleholder/archive/2008/09/03/a-quot-web-2-0-quot-background-stripe-generator.aspx</id><published>2008-09-04T03:52:00Z</published><updated>2008-09-04T03:52:00Z</updated><content type="html">&lt;p&gt;Found this excellent tool today.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.stripegenerator.com" mce_href="http://www.stripegenerator.com"&gt;http://www.stripegenerator.com&lt;/a&gt;&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6597498" width="1" height="1"&gt;</content><author><name>du8die</name><uri>http://weblogs.asp.net/members/du8die.aspx</uri></author><category term=".NET" scheme="http://weblogs.asp.net/kyleholder/archive/tags/.NET/default.aspx" /><category term="Tools" scheme="http://weblogs.asp.net/kyleholder/archive/tags/Tools/default.aspx" /></entry><entry><title>Funny Wallpaper???</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/kyleholder/archive/2008/08/22/funny-wallpaper.aspx" /><id>http://weblogs.asp.net/kyleholder/archive/2008/08/22/funny-wallpaper.aspx</id><published>2008-08-22T20:55:00Z</published><updated>2008-08-22T20:55:00Z</updated><content type="html">&lt;p&gt;So, what is this funny wallpaper thing that seems to be spamming this site? &amp;nbsp;&lt;/p&gt;&lt;p&gt;"Pingback from &amp;nbsp;funny wallpaper &amp;amp;raquo; Create HotKey combinations with jQuery"&lt;/p&gt;&lt;p&gt;I've seen it on pretty much every post on this site for the past month or so.&amp;nbsp; &lt;/p&gt;&lt;p&gt;Interestingly enough, every single post on this site (yes I went...&amp;nbsp; virtual machine)... starts with...&lt;br&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;mswanson&lt;/em&gt;  wrote an interesting post today on&lt;br&gt;Here’s a quick excerpt &lt;/p&gt;&lt;p&gt;(wrong name incidentally). &amp;nbsp;&lt;/p&gt;&lt;p&gt;Anyway.&amp;nbsp; Does this bug anyone else but me? &lt;br&gt;&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6553334" width="1" height="1"&gt;</content><author><name>du8die</name><uri>http://weblogs.asp.net/members/du8die.aspx</uri></author><category term="Community News" scheme="http://weblogs.asp.net/kyleholder/archive/tags/Community+News/default.aspx" /></entry><entry><title>Create HotKey combinations with jQuery</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/kyleholder/archive/2008/08/22/create-hotkey-combinations-with-jquery.aspx" /><id>http://weblogs.asp.net/kyleholder/archive/2008/08/22/create-hotkey-combinations-with-jquery.aspx</id><published>2008-08-22T20:05:00Z</published><updated>2008-08-22T20:05:00Z</updated><content type="html">&lt;p&gt;Here's a great little script that allows you to easily map hot-key combinations using the &lt;a href="http://www.jquery.com" target="_blank" mce_href="http://www.jquery.com"&gt;jQuery&lt;/a&gt; library.&lt;br&gt;&lt;/p&gt;&lt;p&gt;http://code.google.com/p/js-hotkeys/wiki/about &lt;/p&gt;&lt;p&gt;If you haven't seen the &lt;a href="http://www.jquery.com" mce_href="http://www.jquery.com"&gt;jQuery&lt;/a&gt; libray yet, check it out. &lt;br&gt;&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6553154" width="1" height="1"&gt;</content><author><name>du8die</name><uri>http://weblogs.asp.net/members/du8die.aspx</uri></author><category term="ASP.Net" scheme="http://weblogs.asp.net/kyleholder/archive/tags/ASP.Net/default.aspx" /><category term="jQuery" scheme="http://weblogs.asp.net/kyleholder/archive/tags/jQuery/default.aspx" /><category term="VB.Net" scheme="http://weblogs.asp.net/kyleholder/archive/tags/VB.Net/default.aspx" /><category term="Javascript" scheme="http://weblogs.asp.net/kyleholder/archive/tags/Javascript/default.aspx" /><category term="Visual Studio" scheme="http://weblogs.asp.net/kyleholder/archive/tags/Visual+Studio/default.aspx" /></entry><entry><title>Case-Sensitivity in ASP.NET (VB)</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/kyleholder/archive/2008/08/22/case-sensitivity-in-asp-net-vb.aspx" /><id>http://weblogs.asp.net/kyleholder/archive/2008/08/22/case-sensitivity-in-asp-net-vb.aspx</id><published>2008-08-22T15:39:00Z</published><updated>2008-08-22T15:39:00Z</updated><content type="html">&lt;p&gt;Note to self, and anyone else who cares...&lt;/p&gt;&lt;p&gt;ViewState("ReferrerURL") is not the same as ViewState("ReferrerUrl").&lt;/p&gt;Same with Cache object names.&amp;nbsp; Apparently VB does *kinda* care about case sensitivity...&lt;br&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6552242" width="1" height="1"&gt;</content><author><name>du8die</name><uri>http://weblogs.asp.net/members/du8die.aspx</uri></author><category term="ASP.Net" scheme="http://weblogs.asp.net/kyleholder/archive/tags/ASP.Net/default.aspx" /><category term="VB.Net" scheme="http://weblogs.asp.net/kyleholder/archive/tags/VB.Net/default.aspx" /><category term="Visual Basic" scheme="http://weblogs.asp.net/kyleholder/archive/tags/Visual+Basic/default.aspx" /></entry><entry><title>Changing your IP settings with Batch File</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/kyleholder/archive/2008/07/10/changing-your-ip-settings-with-batch-file.aspx" /><id>http://weblogs.asp.net/kyleholder/archive/2008/07/10/changing-your-ip-settings-with-batch-file.aspx</id><published>2008-07-10T19:21:00Z</published><updated>2008-07-10T19:21:00Z</updated><content type="html">&lt;p&gt;My router at home isn't serving IP addresses to my machine anymore.&amp;nbsp; So, rather than figure out what is wrong, or buying a new one (the simple things), I found this helpful gem.&lt;/p&gt;&lt;p&gt;It's a way to set the IP config of your computer from a batch file.&amp;nbsp; &lt;br&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pixelninjas.com/Forums/Default.aspx?g=posts&amp;amp;t=10%20" target="_blank" mce_href="http://www.pixelninjas.com/Forums/Default.aspx?g=posts&amp;amp;t=10 "&gt;Eric Burcham's IP Configuration Batch File&lt;/a&gt; &lt;br&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6385313" width="1" height="1"&gt;</content><author><name>du8die</name><uri>http://weblogs.asp.net/members/du8die.aspx</uri></author><category term="Command Line" scheme="http://weblogs.asp.net/kyleholder/archive/tags/Command+Line/default.aspx" /><category term="FAQ" scheme="http://weblogs.asp.net/kyleholder/archive/tags/FAQ/default.aspx" /><category term="Internet" scheme="http://weblogs.asp.net/kyleholder/archive/tags/Internet/default.aspx" /><category term="General Software Development" scheme="http://weblogs.asp.net/kyleholder/archive/tags/General+Software+Development/default.aspx" /></entry><entry><title>Finding and Deleting Duplicate records in SQL Server</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/kyleholder/archive/2008/06/10/finding-and-deleting-duplicate-records-in-sql-server.aspx" /><id>http://weblogs.asp.net/kyleholder/archive/2008/06/10/finding-and-deleting-duplicate-records-in-sql-server.aspx</id><published>2008-06-10T18:58:00Z</published><updated>2008-06-10T18:58:00Z</updated><content type="html">&lt;p&gt;So, I have a situation where I have some duplicate records in a SQL Server.&amp;nbsp; This is a result of a bad decision I made about 3 months ago.&amp;nbsp; That's another story.&amp;nbsp; I needed to find out how to find those records in my database easily.&lt;/p&gt;&lt;p&gt;&lt;a href="http://blogs.techrepublic.com.com/datacenter/?p=372" target="_blank" mce_href="http://blogs.techrepublic.com.com/datacenter/?p=372"&gt;http://blogs.techrepublic.com.com/datacenter/?p=372&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;Here's the crux:&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;br&gt;&lt;/p&gt;&lt;pre&gt;&lt;code&gt;SELECT * | DELETE FROM table&lt;br&gt;&lt;br&gt;WHERE uniquefield IN&lt;br&gt;&lt;br&gt;  (SELECT uniquefield &lt;br&gt;&lt;br&gt;   FROM table&lt;br&gt;&lt;br&gt;   WHERE EXISTS(&lt;br&gt;&lt;br&gt;      SELECT NULL&lt;br&gt;&lt;br&gt;      FROM table AS tmptable&lt;br&gt;&lt;br&gt;      WHERE table.field1 = tmptable.field1&lt;br&gt;&lt;br&gt;         [AND table.field2 = tmptable.field2&lt;br&gt;&lt;br&gt;         [AND ...]]&lt;br&gt;&lt;br&gt;         HAVING table.uniquefield &amp;gt; MIN(tmptable.uniquefield)&lt;br&gt;&lt;br&gt;    )&lt;br&gt;&lt;br&gt;   )&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;So, I'm running it on my database.&amp;nbsp; It's taking a while since I have close to 2 million rows in the table that I'm trying to match.&amp;nbsp; Crossing my fingers.&amp;nbsp; :)&amp;nbsp;&amp;nbsp;  &lt;br&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6266931" width="1" height="1"&gt;</content><author><name>du8die</name><uri>http://weblogs.asp.net/members/du8die.aspx</uri></author><category term="SQL Server" scheme="http://weblogs.asp.net/kyleholder/archive/tags/SQL+Server/default.aspx" /></entry><entry><title>ASP.NET and Images on a Network Share</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/kyleholder/archive/2008/05/16/asp-net-and-images-on-a-network-share.aspx" /><id>http://weblogs.asp.net/kyleholder/archive/2008/05/16/asp-net-and-images-on-a-network-share.aspx</id><published>2008-05-17T01:58:00Z</published><updated>2008-05-17T01:58:00Z</updated><content type="html">&lt;p&gt;&amp;nbsp;The school district I work for had an idea for an application.&amp;nbsp; The need comes from several angles.&amp;nbsp; First of all, lunch counts are all done by paper.&amp;nbsp; Attendance is taken on paper, then it is sent to the Health Room, where tallies are made, and then everything is recorded into our Student Management System (SMS for short), and our Food Service app.&amp;nbsp; Most (if not all) of our elementary class rooms will have Smart Boards next year.&amp;nbsp; So we decided to write an app that would allow the students to "check in" in the morning on the smart board.&amp;nbsp; The kids can go up to the board and select their lunch choice, and do attendance all at once.&lt;/p&gt;&lt;p&gt;&amp;nbsp;Getting the app to work was the easy part.&amp;nbsp; Our SMS keeps all of the students photos on a drive.&amp;nbsp; I wanted to use those photos directly off of the SMS server, rather than copy them locally.&amp;nbsp; So, I shared the folder that contained the pictures.&amp;nbsp; Then I mapped a drive on the server, and voila.&amp;nbsp; Everything didn't work.&amp;nbsp; &lt;/p&gt;&lt;p&gt;&amp;nbsp;Apparently, there are security restrictions that prevent a web app from using files on a network share.&amp;nbsp; It took a lot of iterations to get where I wanted.&amp;nbsp; I can post details if of the process if need-be.&lt;/p&gt;&lt;p&gt;&amp;nbsp;Here's what I ended up with.&lt;/p&gt;&lt;p&gt;In SQL 2005, there is a little gem.&amp;nbsp; OpenRowSet.&lt;/p&gt;&lt;p&gt;&lt;b&gt;SELECT BulkColumn as 'Photo' FROM OPENROWSET(BULK N'p:\test.jpg', SINGLE_BLOB) AS Photo&lt;/b&gt;&lt;/p&gt;&lt;p&gt;This returns a single column with blob datatype.&amp;nbsp; So, I can then bring it into an image handler and go crazy. &lt;/p&gt;&lt;p&gt;Well, I mapped my drive, and then ran that command, and got an access denied error.&amp;nbsp; I realized that SQL Server runs under the local system account ("NT AUTHORITY\SYSTEM").&amp;nbsp; The mapped drive didn't exist under that identity.&amp;nbsp; So, I then found a reference somewhere (I forget the link) that says you can map a drive to the system account if you schedule a command to run with the AT command.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;br&gt;So, I created a batch file that mapped the drive with the remote machine's authentication:&lt;/p&gt;&lt;p&gt;&lt;b&gt;net use p: \\10.10.xx.xx\pics remotemachinepassword /user:remotemachinename\remotemachineuser&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Then, I scheduled the AT command to run the batch file:&lt;/p&gt;&lt;p&gt;&lt;b&gt;at 20:00 c:\mapit.bat&lt;/b&gt;&lt;/p&gt;&lt;p&gt;This forced the system local account to have the mapped drive.&amp;nbsp; I then ran my SQL in my app that pulled the images over, and PERFECT!&lt;/p&gt;&lt;p&gt;So, using a little SQL Server magic and a mapped drive to the system local user, you can in fact, use a resource from a remote machine in an ASP.NET app.&lt;/p&gt;&lt;p&gt;I want to test the mapped drive without the SQL Server stuff.&amp;nbsp; I'll get to that on Monday.&lt;br&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6197612" width="1" height="1"&gt;</content><author><name>du8die</name><uri>http://weblogs.asp.net/members/du8die.aspx</uri></author><category term="ASP.Net" scheme="http://weblogs.asp.net/kyleholder/archive/tags/ASP.Net/default.aspx" /><category term=".NET" scheme="http://weblogs.asp.net/kyleholder/archive/tags/.NET/default.aspx" /><category term="SQL Server" scheme="http://weblogs.asp.net/kyleholder/archive/tags/SQL+Server/default.aspx" /></entry><entry><title>app_offline.htm</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/kyleholder/archive/2008/03/13/app-unavailable-htm.aspx" /><id>http://weblogs.asp.net/kyleholder/archive/2008/03/13/app-unavailable-htm.aspx</id><published>2008-03-13T13:53:00Z</published><updated>2008-03-13T13:53:00Z</updated><content type="html">&lt;p&gt;This is probably old news, but if you temporarily need to take an ASP.Net Application offline, simply drop a file called app_offline.htm into the root directory of the app. This could be helpful when upgrading a live app.&amp;nbsp; That way, you don't get the ugly app errors that often crop up.&amp;nbsp; Like I said, old news to most of you, but still a helpful reminder.&amp;nbsp;&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5960569" width="1" height="1"&gt;</content><author><name>du8die</name><uri>http://weblogs.asp.net/members/du8die.aspx</uri></author><category term="ASP.Net" scheme="http://weblogs.asp.net/kyleholder/archive/tags/ASP.Net/default.aspx" /><category term=".NET" scheme="http://weblogs.asp.net/kyleholder/archive/tags/.NET/default.aspx" /><category term="IIS" scheme="http://weblogs.asp.net/kyleholder/archive/tags/IIS/default.aspx" /></entry><entry><title>Render the contents of a ReportViewer control directly to PDF.</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/kyleholder/archive/2008/03/05/render-the-contents-of-a-reportviewer-control-directly-to-pdf.aspx" /><id>http://weblogs.asp.net/kyleholder/archive/2008/03/05/render-the-contents-of-a-reportviewer-control-directly-to-pdf.aspx</id><published>2008-03-05T21:05:00Z</published><updated>2008-03-05T21:05:00Z</updated><content type="html">&lt;p&gt;Rendering the output of a ReportViewer control (SQL Reporting Services) directly to PDF is fairly easy.  It involves simply rendering the Report Viewer output to a byte array, and then pushing it to a MemoryStream object and writing to the Output Stream.  Code below:
&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;&lt;span style="color: blue;"&gt;Dim&lt;/span&gt; warnings &lt;span style="color: blue;"&gt;As&lt;/span&gt; Warning() = &lt;span style="color: blue;"&gt;Nothing
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;&lt;span style="color: blue;"&gt;Dim&lt;/span&gt; streamids &lt;span style="color: blue;"&gt;As&lt;/span&gt;
			&lt;span style="color: blue;"&gt;String&lt;/span&gt;() = &lt;span style="color: blue;"&gt;Nothing
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;&lt;span style="color: blue;"&gt;Dim&lt;/span&gt; mimeType &lt;span style="color: blue;"&gt;As&lt;/span&gt;
			&lt;span style="color: blue;"&gt;String&lt;/span&gt; = &lt;span style="color: blue;"&gt;Nothing
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;&lt;span style="color: blue;"&gt;Dim&lt;/span&gt; encoding &lt;span style="color: blue;"&gt;As&lt;/span&gt;
			&lt;span style="color: blue;"&gt;String&lt;/span&gt; = &lt;span style="color: blue;"&gt;Nothing
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;&lt;span style="color: blue;"&gt;Dim&lt;/span&gt; extension &lt;span style="color: blue;"&gt;As&lt;/span&gt;
			&lt;span style="color: blue;"&gt;String&lt;/span&gt; = &lt;span style="color: blue;"&gt;Nothing
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;&lt;span style="color: blue;"&gt;Dim&lt;/span&gt; bytes &lt;span style="color: blue;"&gt;As&lt;/span&gt;
			&lt;span style="color: blue;"&gt;Byte&lt;/span&gt;()
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;bytes = ReportViewer1.ServerReport.Render(&lt;span style="color: maroon;"&gt;"PDF"&lt;/span&gt;, &lt;span style="color: blue;"&gt;Nothing&lt;/span&gt;, mimeType, encoding, extension, streamids, warnings)&lt;br&gt;&lt;span style="color: blue;"&gt;&lt;br&gt;Dim&lt;/span&gt; ms &lt;span style="color: blue;"&gt;As&lt;/span&gt;
			&lt;span style="color: blue;"&gt;New&lt;/span&gt; System.IO.MemoryStream(bytes)
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;Response.ContentType = &lt;span style="color: maroon;"&gt;"Application/pdf"&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;Response.BinaryWrite(ms.ToArray())
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;Response.End()&lt;/span&gt;&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5921658" width="1" height="1"&gt;</content><author><name>du8die</name><uri>http://weblogs.asp.net/members/du8die.aspx</uri></author><category term="ASP.Net" scheme="http://weblogs.asp.net/kyleholder/archive/tags/ASP.Net/default.aspx" /><category term="VB.Net" scheme="http://weblogs.asp.net/kyleholder/archive/tags/VB.Net/default.aspx" /><category term=".NET" scheme="http://weblogs.asp.net/kyleholder/archive/tags/.NET/default.aspx" /><category term="SQL Reporting Services" scheme="http://weblogs.asp.net/kyleholder/archive/tags/SQL+Reporting+Services/default.aspx" /></entry><entry><title>IISRESET on Remote Machine</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/kyleholder/archive/2008/02/08/iisreset-on-remote-machine.aspx" /><id>http://weblogs.asp.net/kyleholder/archive/2008/02/08/iisreset-on-remote-machine.aspx</id><published>2008-02-08T19:11:00Z</published><updated>2008-02-08T19:11:00Z</updated><content type="html">&lt;P mce_keep="true"&gt;I posted this on my &lt;A class="" href="http://www.geekswithblogs.net/kyle" mce_href="http://www.geekswithblogs.net/kyle"&gt;GeeksWithBlogs&lt;/A&gt; blog a while ago (3 years)...&amp;nbsp; I've gotten a few questions about it recently, so I figured I'd post it here and see if it's helpful.&lt;/P&gt;
&lt;P&gt;Ever wondered how to reset IIS on a remote (local network) machine?&lt;/P&gt;
&lt;P&gt;Pop open the command prompt, and type:&lt;/P&gt;
&lt;P&gt;iisreset&amp;nbsp;&amp;lt;machine_name&amp;gt;&lt;/P&gt;
&lt;P&gt;That's all.&lt;/P&gt;
&lt;P&gt;You must be an administrator of the remote machine (on the same domain) or have the same credentials as an administrator on the machine (not on the same domain) for this to work.&lt;/P&gt;
&lt;P&gt;(&lt;A class="" href="http://geekswithblogs.net/kyle/archive/2005/12/02/61942.aspx" mce_href="http://geekswithblogs.net/kyle/archive/2005/12/02/61942.aspx"&gt;HT&lt;/A&gt;)&lt;/P&gt;&lt;!-- Powered by IMHO 1.3 (EN) Instant Blogger Copyright (c) 2005 A.Boschin - http://www.imhoproject.org --&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5737861" width="1" height="1"&gt;</content><author><name>du8die</name><uri>http://weblogs.asp.net/members/du8die.aspx</uri></author><category term="ASP.Net" scheme="http://weblogs.asp.net/kyleholder/archive/tags/ASP.Net/default.aspx" /><category term="Command Line" scheme="http://weblogs.asp.net/kyleholder/archive/tags/Command+Line/default.aspx" /><category term="IISRESET" scheme="http://weblogs.asp.net/kyleholder/archive/tags/IISRESET/default.aspx" /><category term="IIS" scheme="http://weblogs.asp.net/kyleholder/archive/tags/IIS/default.aspx" /></entry><entry><title>Dynamic Code Compliation</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/kyleholder/archive/2008/02/05/dynamic-code-compliation.aspx" /><id>http://weblogs.asp.net/kyleholder/archive/2008/02/05/dynamic-code-compliation.aspx</id><published>2008-02-06T03:36:00Z</published><updated>2008-02-06T03:36:00Z</updated><content type="html">&lt;p&gt;My day job is working in the IT department for a school district.&amp;nbsp; It's an environment where I need to automate a bunch of tasks, and the parameters of the tasks frequently change. I currently have the system set up so that it runs the tasks through a VB.Net console app, and it works.&amp;nbsp; But, I have to recompile the app every time it changes.&amp;nbsp; I needed something more flexible.&lt;/p&gt;&lt;p&gt;&amp;nbsp;So, I found this article and example that essentially takes a text file that contains VB code, compiles it and runs it on the fly.&amp;nbsp; I'm currently implementing it, and hope that it will streamline my processes greatly.&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.thescarms.com/dotNet/dynamiccode.aspx" mce_href="http://www.thescarms.com/dotNet/dynamiccode.aspx"&gt;Here's the link to the article and code.&lt;/a&gt; &lt;br&gt;&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5719516" width="1" height="1"&gt;</content><author><name>du8die</name><uri>http://weblogs.asp.net/members/du8die.aspx</uri></author><category term="VB.Net" scheme="http://weblogs.asp.net/kyleholder/archive/tags/VB.Net/default.aspx" /><category term="Visual Basic" scheme="http://weblogs.asp.net/kyleholder/archive/tags/Visual+Basic/default.aspx" /><category term=".NET" scheme="http://weblogs.asp.net/kyleholder/archive/tags/.NET/default.aspx" /></entry><entry><title>Drag – Drop Interaction with jQuery</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/kyleholder/archive/2008/01/25/drag-drop-interaction-with-jquery.aspx" /><id>http://weblogs.asp.net/kyleholder/archive/2008/01/25/drag-drop-interaction-with-jquery.aspx</id><published>2008-01-26T04:08:21Z</published><updated>2008-01-26T04:08:21Z</updated><content type="html">&lt;p&gt;A few days ago, I posted about getting started with &lt;a href="http://weblogs.asp.net/kyleholder/archive/2008/01/22/jquery-facebox-and-ajax.aspx"&gt;AJAX, Facebox and jQuery&lt;/a&gt;.  Well, I've been doing a little more work with it, and wanted to do a quick demo of the Drag and Drop interaction that is possible with jQuery, and a little preview of how to deal with this stuff and AJAX.  It's pretty slick.
&lt;/p&gt;&lt;p&gt;First of all, go and get the &lt;a href="http://code.google.com/p/jqueryjs/downloads/detail?name=jquery-1.2.2.min.js"&gt;jQuery library&lt;/a&gt;, the &lt;a href="http://code.google.com/p/jqueryjs/downloads/detail?name=jquery.ui-1.0.zip" target="_blank"&gt;jQuery UI library&lt;/a&gt;.  Add script tags that point to the jQuery Library, and then the ui.draggable.js, ui.draggable.ext.js, ui.droppable.js, ui.droppable.ext.js, and ui.mouse.js files from the jQuery UI library.  
&lt;/p&gt;&lt;p&gt;Then, drop two divs on a page.  Give them two different id's.
&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;&lt;span style="color:blue"&gt;&amp;lt;!&lt;/span&gt;&lt;span style="color:maroon"&gt;DOCTYPE&lt;/span&gt;
			&lt;span style="color:red"&gt;html&lt;/span&gt;
			&lt;span style="color:red"&gt;PUBLIC&lt;/span&gt;
			&lt;span style="color:blue"&gt;"-//W3C//DTD XHTML 1.0 Transitional//EN"&lt;/span&gt;
			&lt;span style="color:blue"&gt;"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon"&gt;html&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon"&gt;head&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;
			&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon"&gt;title&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;Untitled Page&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon"&gt;title&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;
			&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon"&gt;script&lt;/span&gt;
			&lt;span style="color:red"&gt;src&lt;/span&gt;&lt;span style="color:blue"&gt;="../JS/jquery-1.2.2.pack.js"&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon"&gt;script&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;    
 &lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;
			&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon"&gt;script&lt;/span&gt;
			&lt;span style="color:red"&gt;type&lt;/span&gt;&lt;span style="color:blue"&gt;="text/javascript"&lt;/span&gt;
			&lt;span style="color:red"&gt;src&lt;/span&gt;&lt;span style="color:blue"&gt;="../JS/jquery.ui-1.0/ui.mouse.js"&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon"&gt;script&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;
			&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon"&gt;script&lt;/span&gt;
			&lt;span style="color:red"&gt;type&lt;/span&gt;&lt;span style="color:blue"&gt;="text/javascript"&lt;/span&gt;
			&lt;span style="color:red"&gt;src&lt;/span&gt;&lt;span style="color:blue"&gt;="../JS/jquery.ui-1.0/ui.draggable.js"&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon"&gt;script&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;
			&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon"&gt;script&lt;/span&gt;
			&lt;span style="color:red"&gt;type&lt;/span&gt;&lt;span style="color:blue"&gt;="text/javascript"&lt;/span&gt;
			&lt;span style="color:red"&gt;src&lt;/span&gt;&lt;span style="color:blue"&gt;="../JS/jquery.ui-1.0/ui.draggable.ext.js"&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon"&gt;script&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;
			&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon"&gt;script&lt;/span&gt;
			&lt;span style="color:red"&gt;type&lt;/span&gt;&lt;span style="color:blue"&gt;="text/javascript"&lt;/span&gt;
			&lt;span style="color:red"&gt;src&lt;/span&gt;&lt;span style="color:blue"&gt;="../JS/jquery.ui-1.0/ui.droppable.js"&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon"&gt;script&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;
			&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon"&gt;script&lt;/span&gt;
			&lt;span style="color:red"&gt;type&lt;/span&gt;&lt;span style="color:blue"&gt;="text/javascript"&lt;/span&gt;
			&lt;span style="color:red"&gt;src&lt;/span&gt;&lt;span style="color:blue"&gt;="../JS/jquery.ui-1.0/ui.droppable.ext.js"&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon"&gt;script&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;    
 &lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;
			&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon"&gt;style&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;
			&lt;span style="color:maroon"&gt;#divDrop
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;            {   
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;
			&lt;span style="color:red"&gt;margin-left&lt;/span&gt;:&lt;span style="color:blue"&gt;auto&lt;/span&gt;;
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;
			&lt;span style="color:red"&gt;width&lt;/span&gt;:&lt;span style="color:blue"&gt;250px&lt;/span&gt;;
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;
			&lt;span style="color:red"&gt;height&lt;/span&gt;:&lt;span style="color:blue"&gt;250px&lt;/span&gt;;
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;
			&lt;span style="color:red"&gt;background-color&lt;/span&gt;:&lt;span style="color:blue"&gt;powderBlue&lt;/span&gt;;
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;            }
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;
			&lt;span style="color:maroon"&gt;#divDrag
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;            {
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;
			&lt;span style="color:red"&gt;width&lt;/span&gt;:&lt;span style="color:blue"&gt;100px&lt;/span&gt;;
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;
			&lt;span style="color:red"&gt;height&lt;/span&gt;:&lt;span style="color:blue"&gt;100px&lt;/span&gt;;
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;
			&lt;span style="color:red"&gt;position&lt;/span&gt;:&lt;span style="color:blue"&gt;absolute&lt;/span&gt;;
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;
			&lt;span style="color:red"&gt;top&lt;/span&gt;:&lt;span style="color:blue"&gt;0px&lt;/span&gt;;
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;
			&lt;span style="color:red"&gt;left&lt;/span&gt;:&lt;span style="color:blue"&gt;0px&lt;/span&gt;;
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;
			&lt;span style="color:red"&gt;background-color&lt;/span&gt;:&lt;span style="color:blue"&gt;yellow&lt;/span&gt;;
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;            }
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;
			&lt;span style="color:maroon"&gt;.droppable-active&lt;/span&gt; {
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;                &lt;span style="color:red"&gt;opacity&lt;/span&gt;: &lt;span style="color:blue"&gt;1.0&lt;/span&gt;;
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;                &lt;span style="color:red"&gt;background-color&lt;/span&gt;:&lt;span style="color:blue"&gt;yellow&lt;/span&gt;;
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;            }
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;
			&lt;span style="color:maroon"&gt;.droppable-hover&lt;/span&gt; {
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;                &lt;span style="color:red"&gt;outline&lt;/span&gt;: &lt;span style="color:blue"&gt;1px&lt;/span&gt;
			&lt;span style="color:blue"&gt;dotted&lt;/span&gt;
			&lt;span style="color:blue"&gt;black&lt;/span&gt;;
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;                &lt;span style="color:red"&gt;background-color&lt;/span&gt;:&lt;span style="color:blue"&gt;white&lt;/span&gt;;
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;            }
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;
			&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon"&gt;style&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;
			&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon"&gt;script&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;        $(document).ready
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;            (
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;
			&lt;span style="color:blue"&gt;function&lt;/span&gt;() 
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;                    {
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;                        $(&lt;span style="color:maroon"&gt;"#divDrag"&lt;/span&gt;).draggable({helper: &lt;span style="color:maroon"&gt;'clone'&lt;/span&gt;});
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;                        $(&lt;span style="color:maroon"&gt;"#divDrop"&lt;/span&gt;).droppable({
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;                            accept: &lt;span style="color:maroon"&gt;"#divDrag"&lt;/span&gt;,
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;                            activeClass: &lt;span style="color:maroon"&gt;'droppable-active'&lt;/span&gt;,
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;                            hoverClass: &lt;span style="color:maroon"&gt;'droppable-hover'&lt;/span&gt;,
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;                            drop: &lt;span style="color:blue"&gt;function&lt;/span&gt;(ev, ui) {
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;                                $(&lt;span style="color:blue"&gt;this&lt;/span&gt;).append(&lt;span style="color:maroon"&gt;"&amp;lt;br&amp;gt;Dropped!"&lt;/span&gt;);
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;                                &lt;span style="color:blue"&gt;var&lt;/span&gt; theId = $(&lt;span style="color:blue"&gt;this&lt;/span&gt;).attr(&lt;span style="color:maroon"&gt;"id"&lt;/span&gt;);
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;                                alert(theId);
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;                                &lt;span style="color:green"&gt;//Do your AJAX stuff in here.
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;                            }
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;                        });
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;     
 &lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;                    }
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;            );
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;
			&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon"&gt;script&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;
		&lt;/span&gt;&lt;/p&gt;&lt;p&gt;    
 &lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon"&gt;head&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon"&gt;body&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;
		&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;
			&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon"&gt;div&lt;/span&gt;
			&lt;span style="color:red"&gt;id&lt;/span&gt;&lt;span style="color:blue"&gt;='divDrop'&amp;gt;&lt;/span&gt;Drop Here.&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon"&gt;div&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;
		&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;
			&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:maroon"&gt;div&lt;/span&gt;
			&lt;span style="color:red"&gt;id&lt;/span&gt;&lt;span style="color:blue"&gt;='divDrag'&amp;gt;&lt;/span&gt;Drag Me.&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon"&gt;div&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon"&gt;body&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New; font-size:10pt"&gt;&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:maroon"&gt;html&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;
 &lt;/p&gt;&lt;p&gt;That's the gist of it.  As you can see, the possibilities now are endless.  What's really impressive is drag and drop in well, as little as two lines of code. 
&lt;/p&gt;&lt;p&gt;Enjoy!&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5653726" width="1" height="1"&gt;</content><author><name>du8die</name><uri>http://weblogs.asp.net/members/du8die.aspx</uri></author><category term="Ajax" scheme="http://weblogs.asp.net/kyleholder/archive/tags/Ajax/default.aspx" /><category term="ASP.Net" scheme="http://weblogs.asp.net/kyleholder/archive/tags/ASP.Net/default.aspx" /><category term="jQuery" scheme="http://weblogs.asp.net/kyleholder/archive/tags/jQuery/default.aspx" /></entry><entry><title>jQuery, Facebox and AJAX</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/kyleholder/archive/2008/01/22/jquery-facebox-and-ajax.aspx" /><id>http://weblogs.asp.net/kyleholder/archive/2008/01/22/jquery-facebox-and-ajax.aspx</id><published>2008-01-22T20:06:00Z</published><updated>2008-01-22T20:06:00Z</updated><content type="html">&lt;p&gt;One frustration that I've had for the 4 years that I've been working with AJAX is how messy the front-side code can get.  There's lots of JavaScript, and that can get kind of annoying.  Plus, there's the design perspective of trying to find the right real-estate to put things in.  Where do you have a hidden div pop up and provide space for an update?  I've been working on a project for my wife, and I've found a nice way to get around some of that, separate my code a little bit, and clean things up so they aren't so cluttered.
&lt;/p&gt;&lt;p&gt;Recently, I ran across the &lt;a href="http://www.jquery.com/" mce_href="http://www.jquery.com/"&gt;jQuery&lt;/a&gt; library.  It is a seemingly robust JavaScript wrapper that simplifies (greatly) the amount of code you write for a routine task.  For example, before jQuery, if you wanted to toggle the visibility (display) of a div, you would have to do this:
&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;&lt;span style="color: blue;"&gt;function&lt;/span&gt; toggle(p)
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;{
&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-left: 36pt;"&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;&lt;span style="color: blue;"&gt;if&lt;/span&gt; (document.getElementById(&lt;span style="color: maroon;"&gt;"case"&lt;/span&gt; + p + &lt;span style="color: maroon;"&gt;"List"&lt;/span&gt;).style.display == &lt;span style="color: maroon;"&gt;"none"&lt;/span&gt;)
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;                    {
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;                        document.getElementById(&lt;span style="color: maroon;"&gt;"case"&lt;/span&gt; + p + &lt;span style="color: maroon;"&gt;"List"&lt;/span&gt;).style.display = &lt;span style="color: maroon;"&gt;"inline"&lt;/span&gt;;
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;                        document.getElementById(&lt;span style="color: maroon;"&gt;"img"&lt;/span&gt; + p).src = &lt;span style="color: maroon;"&gt;'images/minus.jpg'&lt;/span&gt;;
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;                    } 
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;
			&lt;span style="color: blue;"&gt;else&lt;/span&gt;
		&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;                    {
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;                        document.getElementById(&lt;span style="color: maroon;"&gt;"case"&lt;/span&gt; + p + &lt;span style="color: maroon;"&gt;"List"&lt;/span&gt;).style.display = &lt;span style="color: maroon;"&gt;"none"&lt;/span&gt;;
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;                        document.getElementById(&lt;span style="color: maroon;"&gt;"img"&lt;/span&gt; + p).src = &lt;span style="color: maroon;"&gt;'images/plus.jpg'&lt;/span&gt;;
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;                    }
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;      }
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;With jQuery, you simply do this:
&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;&lt;span style="color: blue;"&gt;function&lt;/span&gt; toggleStatus()
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;{
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;          $(&lt;span style="color: maroon;"&gt;"#statusChange"&lt;/span&gt;).toggle();
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;}
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;It's really that simple.  So, jQuery is a great little framework that allows me to do a ton of stuff.
&lt;/p&gt;&lt;p&gt;Enter "&lt;a href="http://www.famspam.com/facebox" mce_href="http://www.famspam.com/facebox"&gt;Facebox&lt;/a&gt;." This is a jQuery plug-in that creates a Facebook style pop-up window.  It can be used as a lightbox, or more importantly for me, as a container for other content, including complete pages.  To open an instance of Facebox, all I do is create a hyperlink tag (&amp;lt;a href='test.htm' rel='facebook'&amp;gt;test&amp;lt;/a&amp;gt;).  When I click this link, Facebox pops up with the contents of test.htm neatly packed inside.  Beautiful.  
&lt;/p&gt;&lt;p&gt;Now, I simply create a new page, call it "createnewwhatever.aspx," plug it in to my URL, and do all my AJAX stuff on that page.  Keeps it clean, because it's not on your main page, and it's reusable.  
&lt;/p&gt;&lt;p&gt;The one thing Facebox cannot do is post-backs.  That doesn't really bother me much yet.  Who knows if it will or not.  I've also not had much luck with jQuery and MasterPages.  (Facebox works, but I'm having trouble with other plugs.)  I probably just don't understand the syntax well enough.
&lt;/p&gt;&lt;p&gt;But, this represents a significant step forward for me in terms of UI design and usability.  Try it out.&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5636465" width="1" height="1"&gt;</content><author><name>du8die</name><uri>http://weblogs.asp.net/members/du8die.aspx</uri></author><category term="Ajax" scheme="http://weblogs.asp.net/kyleholder/archive/tags/Ajax/default.aspx" /><category term="ASP.Net" scheme="http://weblogs.asp.net/kyleholder/archive/tags/ASP.Net/default.aspx" /><category term="jQuery" scheme="http://weblogs.asp.net/kyleholder/archive/tags/jQuery/default.aspx" /></entry></feed>