<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-954701964661625078</atom:id><lastBuildDate>Sat, 13 Feb 2010 07:47:18 +0000</lastBuildDate><title>James' Sandbox</title><description>[Google: James Sandbox] The Sandbox contains information on .NET, C#, Classic ASP, AJAX, PHP, XSL, XML, SQL, MySql, Oracle, SharePoint (WSS, MOSS) and anything else that I think will help anyone else out (including myself).  Feel free to post comments, follow-ups.</description><link>http://www.jwc3.net/</link><managingEditor>noreply@blogger.com (James Curtis)</managingEditor><generator>Blogger</generator><openSearch:totalResults>87</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/JamesSandbox" /><feedburner:info uri="jamessandbox" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item><guid isPermaLink="false">tag:blogger.com,1999:blog-954701964661625078.post-6834797211655620290</guid><pubDate>Mon, 01 Feb 2010 17:50:00 +0000</pubDate><atom:updated>2010-02-01T12:59:07.111-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Presentations</category><category domain="http://www.blogger.com/atom/ns#">SPSIndy</category><category domain="http://www.blogger.com/atom/ns#">SharePoint</category><title>SharePoint Saturday: Indianapolis - Post Conference</title><description>So, I had the pleasure of presenting the topic of "Introduction to the SharePoint 2010 Client Object Model" at SharePoint Saturday in Indianapolis.  This is the 2nd time of covering this topic after the &lt;a href="http://blogs.msdn.com/pstubbs/"&gt;Paul Stubbs&lt;/a&gt; covered the topic at the 2009 SharePoint Conference.&lt;br /&gt;&lt;br /&gt;As promised, I put up my two applications on my SharePoint Developer SIG site, &lt;a href="http://nspin.net"&gt;nSpin.net&lt;/a&gt;.  You can download both projects in one zip file &lt;a href="http://www.nspin.net/presentations/Documents/2010/SharePointSaturday_JamesCurtis.zip.zip"&gt;using this link&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;The two projects are:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;- Console application - demonstrates using .NET CLR to grab and then update SharePoint data using Client Object Model&lt;br /&gt;&lt;br /&gt;- Web Application Page - demonstrates using ECMAScript (JavaScript) to grab data and have a JavaScript alert.&lt;br /&gt;&lt;br /&gt;- Web Application Page - demonstrates using ECMAScript (JavaScript) to grab data from an Announcements list and populate a jQuery sortable list&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;For these projects, you will Need:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;- Visual Studio 2010 Beta 2&lt;br /&gt;- SharePoint 2010 Site running&lt;br /&gt;- Annoucements (or other list you configure in code)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Cheers!&lt;br /&gt;&lt;br /&gt;- James&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/954701964661625078-6834797211655620290?l=www.jwc3.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/w95-BUTSpXY8uZwrf7urnv7IcMg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/w95-BUTSpXY8uZwrf7urnv7IcMg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/w95-BUTSpXY8uZwrf7urnv7IcMg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/w95-BUTSpXY8uZwrf7urnv7IcMg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/JamesSandbox/~4/jqQPIbfK0mY" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/JamesSandbox/~3/jqQPIbfK0mY/sharepoint-saturday-indianapolis-post.html</link><author>noreply@blogger.com (James Curtis)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.jwc3.net/2010/02/sharepoint-saturday-indianapolis-post.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-954701964661625078.post-7852823460776245766</guid><pubDate>Mon, 07 Dec 2009 15:41:00 +0000</pubDate><atom:updated>2009-12-07T10:43:15.845-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Presentations</category><category domain="http://www.blogger.com/atom/ns#">SPSIndy</category><category domain="http://www.blogger.com/atom/ns#">SharePoint</category><title>SharePoint Saturday: Indy: January 30th, 2010</title><description>Indy is going to be having a SharePoint Saturday.  We've got a call out for speakers at the moment. Go to: &lt;a href="http://bit.ly/4u7qJ9"&gt;http://bit.ly/4u7qJ9&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;About SPS:&lt;/span&gt; Join SharePoint architects, developers, and other professionals that work with Microsoft Office SharePoint Server 2007 for SharePoint Saturday Indianapolis on January 30, 2010. &lt;br /&gt;&lt;br /&gt;SharePoint Saturday Indianapolis is an educational, informative &amp; lively day filled with sessions from respected SharePoint professionals &amp; MVPs, covering a wide variety of SharePoint-orientated topics.  SharePoint Saturday is FREE, open to the public and is your local chance to immerse yourself in SharePoint!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/954701964661625078-7852823460776245766?l=www.jwc3.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/yngPNsbhpZ9-yWIrlSun9_qhHaE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/yngPNsbhpZ9-yWIrlSun9_qhHaE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/yngPNsbhpZ9-yWIrlSun9_qhHaE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/yngPNsbhpZ9-yWIrlSun9_qhHaE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/JamesSandbox/~4/hlV9T2zcpVE" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/JamesSandbox/~3/hlV9T2zcpVE/sharepoint-saturday-indy-january-30th.html</link><author>noreply@blogger.com (James Curtis)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.jwc3.net/2009/12/sharepoint-saturday-indy-january-30th.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-954701964661625078.post-9206151456682565328</guid><pubDate>Fri, 04 Dec 2009 13:56:00 +0000</pubDate><atom:updated>2009-12-07T11:16:54.359-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">IDE</category><category domain="http://www.blogger.com/atom/ns#">Tips and Tricks</category><title>Hyper-V Virtual Machines: Wireless Connection: Receives IP: Cannot Browse Internet</title><description>Ever since I've converted my laptop into a Windows 2008 R2 workstation, I've had issues with some wireless networks where my Virtual Machines receive an IP Address, Gateway and DNS servers, but could not browse Internal or External Web Sites.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;The Problem?&lt;/em&gt;&lt;/strong&gt;  &lt;strong&gt;DNS Servers.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;For whatever reason, the Internal DNS Servers that are getting assigned to my Virtual Machine are not able to resolve web sites like Google.com.  So, I edited the properties of my connection (in the Virtual Machine) and put in static DNS servers like the Level 3 DNS Servers:&lt;br /&gt;&lt;br /&gt;- 4.2.2.1&lt;br /&gt;- 4.2.2.2&lt;br /&gt;&lt;br /&gt;The issue seems to be that the IP Address that my Virtual Machine was getting assigned was a different IP Address Schema than the main network (and Internal DNS servers).  So, while my VM was 10.8.8.24, the DNS server was 10.4.4.10.  Normally, the host machine still works fine with this setup, but the Hyper-V VM cannot deal with this setup.&lt;br /&gt;&lt;br /&gt;My setup for my laptop is Windows 2008 R2 (x64) (Host OS) running Hyper-V Virtual Machines that are all (x64) bit.  &lt;br /&gt;&lt;br /&gt;Hope that helps you (if you needed it). &lt;br /&gt;&lt;br /&gt;Cheers.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/954701964661625078-9206151456682565328?l=www.jwc3.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/iBebQUIALIEdGXdrW8abVm59oTQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/iBebQUIALIEdGXdrW8abVm59oTQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/iBebQUIALIEdGXdrW8abVm59oTQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/iBebQUIALIEdGXdrW8abVm59oTQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/JamesSandbox/~4/M9niu8h_CAQ" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/JamesSandbox/~3/M9niu8h_CAQ/hyper-v-virtual-machines-wireless.html</link><author>noreply@blogger.com (James Curtis)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.jwc3.net/2009/12/hyper-v-virtual-machines-wireless.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-954701964661625078.post-6165944427389268770</guid><pubDate>Tue, 01 Dec 2009 21:21:00 +0000</pubDate><atom:updated>2009-12-01T18:22:27.103-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">IDE</category><category domain="http://www.blogger.com/atom/ns#">SharePoint</category><category domain="http://www.blogger.com/atom/ns#">Mossquito</category><title>Mossquito 2009: Installation Setup</title><description>So, you're curious about the Mossquito program?  Would you like to know how to set it up?  Well, there's a "James Walkthrough" for that.  :)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;What's Mossquito?  If this is you, check out the &lt;a href="http://www.jwc3.net/2009/11/mossquito-first-look-sharepoint.html"&gt;Introduction to Mossquito 2009&lt;/a&gt; post.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;0)&lt;/b&gt; First things first... Go to &lt;a href="http://www.boldbrick.com"&gt;www.boldbrick.com&lt;/a&gt; and download yourself a copy of the Mossquito program.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;b&gt;-- We'll look at installing the development environment first and then the server addition required for Mossquito --&lt;/b&gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;1)&lt;/b&gt; Fire open the Mossquito installer file and you'll be greeted by the Wizard Start Page.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BVcJoi56t9c/SxWJ4QsqL1I/AAAAAAAAAQs/zlY57Ub_Rfg/s1600/00-m2009-setup-wizard.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 308px;" src="http://3.bp.blogspot.com/_BVcJoi56t9c/SxWJ4QsqL1I/AAAAAAAAAQs/zlY57Ub_Rfg/s400/00-m2009-setup-wizard.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5410382127003479890" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;2)&lt;/b&gt; Next page, Terms and Conditions -- accept and continue (read to make sure that you are not giving up your first born! [just kidding])&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BVcJoi56t9c/SxWJ4gl6wKI/AAAAAAAAAQ0/wvICz9Dg1pA/s1600/01-m2009-setup-wizard.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 310px;" src="http://4.bp.blogspot.com/_BVcJoi56t9c/SxWJ4gl6wKI/AAAAAAAAAQ0/wvICz9Dg1pA/s400/01-m2009-setup-wizard.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5410382131270172834" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;3)&lt;/b&gt; Next page, Destination Folder -- feel free to update this, but I don't really see a need to do so I left it to the default. &lt;em&gt;(Note: the &amp;quot;C:\Program Files\&amp;quot; instead of &amp;quot;C:\Program Files\BoldBrick\Mossquito 2009&amp;quot; is a known bug in the beta)&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BVcJoi56t9c/SxWJ41nzJSI/AAAAAAAAAQ8/IyIMNm4jqnY/s1600/02-m2009-setup-wizard.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 308px;" src="http://2.bp.blogspot.com/_BVcJoi56t9c/SxWJ41nzJSI/AAAAAAAAAQ8/IyIMNm4jqnY/s400/02-m2009-setup-wizard.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5410382136915207458" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;4)&lt;/b&gt; Next page, Choose Setup Type -- go ahead and select &lt;b&gt;"Complete"&lt;/b&gt; since you might as well have everything local.  &lt;em&gt;(Note:  If your development environment is on a server technology running SharePoint, then this will also install the Server piece of Mossquito and you will not need to run the Mossquito server setup seperately)&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BVcJoi56t9c/SxWJ5KC0wrI/AAAAAAAAARE/zp4rshNJhME/s1600/03-m2009-setup-wizard-complete.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 308px;" src="http://4.bp.blogspot.com/_BVcJoi56t9c/SxWJ5KC0wrI/AAAAAAAAARE/zp4rshNJhME/s400/03-m2009-setup-wizard-complete.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5410382142397268658" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BVcJoi56t9c/SxWJ5ul4XCI/AAAAAAAAARM/V-CXR4_SNdE/s1600/04-m2009-setup-wizard-complete.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 306px;" src="http://2.bp.blogspot.com/_BVcJoi56t9c/SxWJ5ul4XCI/AAAAAAAAARM/V-CXR4_SNdE/s400/04-m2009-setup-wizard-complete.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5410382152207981602" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;5)&lt;/b&gt; Next page, Service Account -- if you need the service to run under a different domain account, you can enter that here -- I just let it default to Network Service.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BVcJoi56t9c/SxWLEPGvw8I/AAAAAAAAARU/8nHnENdALj4/s1600/05-m2009-setup-wizard.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 307px;" src="http://3.bp.blogspot.com/_BVcJoi56t9c/SxWLEPGvw8I/AAAAAAAAARU/8nHnENdALj4/s400/05-m2009-setup-wizard.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5410383432246084546" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;6)&lt;/b&gt; Ready to Install -- well, click &lt;b&gt;"Install'&lt;/b&gt; already!&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BVcJoi56t9c/SxWLUoI-fUI/AAAAAAAAARc/CyLbK0bQ87Q/s1600/06-m2009-setup-wizard.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 309px;" src="http://4.bp.blogspot.com/_BVcJoi56t9c/SxWLUoI-fUI/AAAAAAAAARc/CyLbK0bQ87Q/s400/06-m2009-setup-wizard.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5410383713844231490" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BVcJoi56t9c/SxWLd7RwY_I/AAAAAAAAARk/3mwGQPkBRTM/s1600/07-m2009-setup-wizard.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 307px;" src="http://3.bp.blogspot.com/_BVcJoi56t9c/SxWLd7RwY_I/AAAAAAAAARk/3mwGQPkBRTM/s400/07-m2009-setup-wizard.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5410383873600152562" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BVcJoi56t9c/SxWOeMtqACI/AAAAAAAAASE/2sWK4xfHRx0/s1600/00-mossquito-installed.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 313px;" src="http://2.bp.blogspot.com/_BVcJoi56t9c/SxWOeMtqACI/AAAAAAAAASE/2sWK4xfHRx0/s400/00-mossquito-installed.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5410387176815460386" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;That's it!  Mossquito is now installed on your development machine.  If your development machine is seperate from your SharePoint server, then you will need to install "Mossquito Server" on the SharePoint server.  Those instructions are below.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;b&gt;-- Now that we have the development environment is setup, now we need to install "Mossquito Server" on the SharePoint server (this is only required on [1] SharePoint server in a SharePoint Farm --&lt;/b&gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;Installing the &lt;b&gt;Mossquito Server&lt;/b&gt; is almost the same process as it is for installing the development environment for Mossquito.  I'll outline the changes that need to be made for just the &lt;b&gt;Mossquito Server&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;1)&lt;/b&gt; Follow Steps [1] to [3] above for installing Mossquito&lt;br /&gt;&lt;br /&gt;&lt;b&gt;2)&lt;/b&gt; Next page, Choose Setup Type -- This time we just need to select &lt;b&gt;"Custom"&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BVcJoi56t9c/SxWNUUHmXfI/AAAAAAAAAR0/XpM5llNeLqA/s1600/03-m2009-setup-wizard-custom.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 308px;" src="http://3.bp.blogspot.com/_BVcJoi56t9c/SxWNUUHmXfI/AAAAAAAAAR0/XpM5llNeLqA/s400/03-m2009-setup-wizard-custom.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5410385907493002738" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BVcJoi56t9c/SxWJ5ul4XCI/AAAAAAAAARM/V-CXR4_SNdE/s1600/04-m2009-setup-wizard-complete.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 306px;" src="http://2.bp.blogspot.com/_BVcJoi56t9c/SxWJ5ul4XCI/AAAAAAAAARM/V-CXR4_SNdE/s400/04-m2009-setup-wizard-complete.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5410382152207981602" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;3)&lt;/b&gt; Deselect everything except for the Mossquito 2009 Server&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_BVcJoi56t9c/SxWNUhQpI7I/AAAAAAAAAR8/6nQCR36ojsc/s1600/04-m2009-setup-wizard-custom.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 308px;" src="http://3.bp.blogspot.com/_BVcJoi56t9c/SxWNUhQpI7I/AAAAAAAAAR8/6nQCR36ojsc/s400/04-m2009-setup-wizard-custom.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5410385911020594098" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;4)&lt;/b&gt; Follow Steps [5] and [6] above and you'll be good to go with installing &lt;b&gt;Mossquito Server&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;5)&lt;/b&gt; Be sure to allow &lt;b&gt;Mossquito Server&lt;/b&gt; to Start with the installation is finished.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BVcJoi56t9c/SxWLpzM7lOI/AAAAAAAAARs/ymkuZoMCcPs/s1600/08-m2009-setup-wizard.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 309px;" src="http://2.bp.blogspot.com/_BVcJoi56t9c/SxWLpzM7lOI/AAAAAAAAARs/ymkuZoMCcPs/s400/08-m2009-setup-wizard.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5410384077590861026" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;That's it for the Mossquito Server!  You can now fully utilize the Mossquito program!&lt;br /&gt;&lt;br /&gt;Cheers!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/954701964661625078-6165944427389268770?l=www.jwc3.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/WD-Q-k4vP3O-oBoHdUssBQd1fzU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/WD-Q-k4vP3O-oBoHdUssBQd1fzU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/WD-Q-k4vP3O-oBoHdUssBQd1fzU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/WD-Q-k4vP3O-oBoHdUssBQd1fzU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/JamesSandbox/~4/UmEWOMEaJvA" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/JamesSandbox/~3/UmEWOMEaJvA/mossquito-2009-installation-setup.html</link><author>noreply@blogger.com (James Curtis)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_BVcJoi56t9c/SxWJ4QsqL1I/AAAAAAAAAQs/zlY57Ub_Rfg/s72-c/00-m2009-setup-wizard.jpg" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.jwc3.net/2009/12/mossquito-2009-installation-setup.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-954701964661625078.post-463227795753367730</guid><pubDate>Mon, 30 Nov 2009 14:25:00 +0000</pubDate><atom:updated>2009-12-01T17:22:35.855-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">IDE</category><category domain="http://www.blogger.com/atom/ns#">SharePoint</category><category domain="http://www.blogger.com/atom/ns#">Mossquito</category><category domain="http://www.blogger.com/atom/ns#">MOSS 2007</category><title>Mossquito: First Look (SharePoint Developer's IDE)</title><description>At the SharePoint Conference 2009, in the mist of all the vendors pushing their various products, I had the opportunity to meet Ondrej and Hynek from the company BoldBrick.  They make an awesome Developer program for SharePoint called "Mossquito". &lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_BVcJoi56t9c/SxPXvOT3fgI/AAAAAAAAAPs/7WlNwBwLk_U/s1600/pub-mossquito2009.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 232px;" src="http://1.bp.blogspot.com/_BVcJoi56t9c/SxPXvOT3fgI/AAAAAAAAAPs/7WlNwBwLk_U/s400/pub-mossquito2009.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5409904783697346050" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Besides it's cool name, it is a very powerful IDE for developers of SharePoint.  With this tool, you can develop, deploy and manage SharePoint web sites.  If you want to read more about Mossquito, go to the &lt;a href="http://www.boldbrick.com/Mossquito/Product-Info.aspx"&gt;BoldBrick.com Web Site&lt;/a&gt;, otherwise I'll continue on with my first look at the program.&lt;br /&gt;&lt;br /&gt;So, after you install what you get in this IDE is a treasure trove of features including:&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;li&gt;Web Site Data Model Support&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Navigation Data Model Support&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Code Generation &lt;i&gt;(My Personal Favorite)&lt;/i&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Compare &amp; Merge Engine&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Deployment Engine&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Diagramming&lt;/li&gt;&lt;br /&gt;&lt;li&gt;SharePoint Integration&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Remote SharePoint Access&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Security&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Project Management&lt;/li&gt;&lt;br /&gt;&lt;li&gt;and more...&lt;/li&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.boldbrick.com/Mossquito/Features.aspx"&gt;Mossquito 2009 Full Feature List&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Below are a few screenshots pulled from the Mossquito site about the product.  What you'll notice (as I did) is that it's very user friendly and resembles an Office 2007 product with the ribbon-like bar at the top.  The UI is very rich in features and I found that it was pretty easy to get around.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;[Start Page]&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_BVcJoi56t9c/SxPYCBGl-pI/AAAAAAAAAP0/u9YaYo_y-vw/s1600/pub-01-Start-page.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 320px;" src="http://3.bp.blogspot.com/_BVcJoi56t9c/SxPYCBGl-pI/AAAAAAAAAP0/u9YaYo_y-vw/s400/pub-01-Start-page.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5409905106569525906" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;[Opened Project]&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_BVcJoi56t9c/SxPYioHrddI/AAAAAAAAAP8/vjf7IPst8As/s1600/pub-02-Opened-project.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 320px;" src="http://3.bp.blogspot.com/_BVcJoi56t9c/SxPYioHrddI/AAAAAAAAAP8/vjf7IPst8As/s400/pub-02-Opened-project.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5409905666798876114" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;[Content Type Hierarchy]&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_BVcJoi56t9c/SxPYqUC0m9I/AAAAAAAAAQE/8fWcT-982bU/s1600/pub-03-Content-type-hierarchy.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 320px;" src="http://3.bp.blogspot.com/_BVcJoi56t9c/SxPYqUC0m9I/AAAAAAAAAQE/8fWcT-982bU/s400/pub-03-Content-type-hierarchy.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5409905798848748498" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;[Site Column]&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_BVcJoi56t9c/SxPY0Hr43MI/AAAAAAAAAQM/XC1nTikDBxc/s1600/pub-04-Site-column.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 320px;" src="http://2.bp.blogspot.com/_BVcJoi56t9c/SxPY0Hr43MI/AAAAAAAAAQM/XC1nTikDBxc/s400/pub-04-Site-column.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5409905967330024642" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;And here are some screenshots from my use of Mossquito:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;[Full Diagram of Lists, Content Types and Views]&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_BVcJoi56t9c/SxPdc1PlCDI/AAAAAAAAAQU/yMHS66TCdiE/s1600/test-01-m2009-diagram-full.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 290px;" src="http://2.bp.blogspot.com/_BVcJoi56t9c/SxPdc1PlCDI/AAAAAAAAAQU/yMHS66TCdiE/s400/test-01-m2009-diagram-full.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5409911064800593970" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;[Zoom-In of Diagram Above]&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_BVcJoi56t9c/SxPdx_Gvl4I/AAAAAAAAAQc/eymy4HX05Kg/s1600/test-01-m2009-diagram-zoom.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 290px;" src="http://4.bp.blogspot.com/_BVcJoi56t9c/SxPdx_Gvl4I/AAAAAAAAAQc/eymy4HX05Kg/s400/test-01-m2009-diagram-zoom.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5409911428225144706" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;[Custom List "Leave Requests" Example]&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_BVcJoi56t9c/SxPee0ujvBI/AAAAAAAAAQk/rC0IKBUTDLM/s1600/test-02-m2009-customlist.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 291px;" src="http://4.bp.blogspot.com/_BVcJoi56t9c/SxPee0ujvBI/AAAAAAAAAQk/rC0IKBUTDLM/s400/test-02-m2009-customlist.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5409912198533463058" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;So, as you can see that this Mossquito product definitely brings a lot to the table as an IDE for SharePoint development.  I'm currently running it "through the ringer" to flush out pros and cons of the program, but so far, I've run only into "pros" for this program.  I believe that the street price for Mossquito is going to be 899 Euros ($1,299 USD) which is a steal if you compare to other programs like MetaVis for SharePoint.&lt;br /&gt;&lt;br /&gt;If you want to read more about Mossquito, go to the &lt;a href="http://www.boldbrick.com/Mossquito/Product-Info.aspx"&gt;BoldBrick.com Web Site&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;If you are looking for the Installation Setup walkthrough, check out the &lt;a href="http://www.jwc3.net/2009/12/mossquito-2009-installation-setup.html"&gt;Mossquito 2009: Installation Setup&lt;/a&gt; post.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Cheers.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/954701964661625078-463227795753367730?l=www.jwc3.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/sQE9ddD4CRFVfHHj89upCG4YdQo/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/sQE9ddD4CRFVfHHj89upCG4YdQo/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/sQE9ddD4CRFVfHHj89upCG4YdQo/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/sQE9ddD4CRFVfHHj89upCG4YdQo/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/JamesSandbox/~4/pN-Y2EBy4EU" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/JamesSandbox/~3/pN-Y2EBy4EU/mossquito-first-look-sharepoint.html</link><author>noreply@blogger.com (James Curtis)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_BVcJoi56t9c/SxPXvOT3fgI/AAAAAAAAAPs/7WlNwBwLk_U/s72-c/pub-mossquito2009.jpg" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.jwc3.net/2009/11/mossquito-first-look-sharepoint.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-954701964661625078.post-5194209720395135832</guid><pubDate>Thu, 01 Oct 2009 19:26:00 +0000</pubDate><atom:updated>2009-10-01T16:42:42.616-04:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">MVC</category><category domain="http://www.blogger.com/atom/ns#">SubSonic</category><category domain="http://www.blogger.com/atom/ns#">Examples</category><category domain="http://www.blogger.com/atom/ns#">jQuery</category><title>SubSonic 3 with MVC and jQuery - Example (Part 2)</title><description>In &lt;a href="http://www.jwc3.net/2009/10/subsonic-3-with-mvc-and-jquery-example.html"&gt;part 1 of SubSonic 3 with MVC and jQuery&lt;/a&gt;, I walked you through getting started and setup with MVC 1.0 and SubSonic.  Here in part 2, I'll be showing more code on MVC Actions like Details, Create, Edit and Delete. &lt;br /&gt;&lt;br /&gt;Picking up from the &lt;a href="http://www.jwc3.net/2009/10/subsonic-3-with-mvc-and-jquery-example.html"&gt;part 1&lt;/a&gt; of the series where I was dissecting the "Index" view, let's go back to the ProductsController class in the "Controllers" folder.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;ActionResult: Details&lt;/b&gt;&lt;br /&gt;This is straight forward, but it's the first ActionResult where you are receiving a parameter like a normail method.  In my code below, I'm establishing my repository with SubSonic using the SimpleRepository method.  Next, it looks up the product based on the "&lt;strong&gt;id&lt;/strong&gt;" being passed.  &lt;br /&gt;&lt;br /&gt;If it doesn't find it, then it redirects to the "&lt;strong&gt;NotFound&lt;/strong&gt;" View.  If it does find it, then it goes to the "Details" View and passes the &lt;strong&gt;product data class&lt;/strong&gt;.&lt;br /&gt;&lt;pre class="code"&gt;&lt;span class="rem"&gt;//&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;// GET: /Products/Details/5&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; ActionResult Details(&lt;span class="kwrd"&gt;int&lt;/span&gt; id)&lt;br /&gt;{&lt;br /&gt;    &lt;span class="rem"&gt;// Get Product&lt;/span&gt;&lt;br /&gt;    var _repo = &lt;span class="kwrd"&gt;new&lt;/span&gt; SimpleRepository();&lt;br /&gt;    Product product = _repo.Single&amp;lt;Product&amp;gt;(id);&lt;br /&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;if&lt;/span&gt; (product == &lt;span class="kwrd"&gt;null&lt;/span&gt;)&lt;br /&gt;    {&lt;br /&gt;        &lt;span class="kwrd"&gt;return&lt;/span&gt; View(&lt;span class="str"&gt;"NotFound"&lt;/span&gt;);&lt;br /&gt;    }&lt;br /&gt;    &lt;span class="kwrd"&gt;else&lt;/span&gt;&lt;br /&gt;    {&lt;br /&gt;        &lt;span class="kwrd"&gt;return&lt;/span&gt; View(&lt;span class="str"&gt;"Details"&lt;/span&gt;, product);&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;Like before with the "Index" view, Right-Click on the "&lt;strong&gt;Details&lt;/strong&gt;" that's next to the &lt;strong&gt;ActionResult&lt;/strong&gt; and select "Add View".  Be sure to select your "&lt;strong&gt;data class&lt;/strong&gt;" for &lt;strong&gt;products&lt;/strong&gt; and your "&lt;strong&gt;view content&lt;/strong&gt;" for &lt;strong&gt;Details&lt;/strong&gt;. &lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_BVcJoi56t9c/SsUE4rK5p7I/AAAAAAAAANU/eh_trOBqMfY/s1600-h/mvc_add_details.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 349px; height: 382px;" src="http://3.bp.blogspot.com/_BVcJoi56t9c/SsUE4rK5p7I/AAAAAAAAANU/eh_trOBqMfY/s400/mvc_add_details.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5387717900926298034" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Again, by telling Visual Studio MVC what data class you are using and the view content that you want, it automatically builds the view for you by putting in the database fields that you have which is very cool and convenient. :)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;ActionResult: Delete&lt;/b&gt;&lt;br /&gt;The Delete is also simple in that you call it like you do the "Details" view (in the Get method type).  The code within is virtually identical to the "Details" view, but just returning to the "Delete" view instead.  Follow the same instructions fo the "Delete" view as you did for the "Details" View.&lt;br /&gt;&lt;br /&gt;After you created the "Delete" view, add code like the following to the "MainContent" section of the "Delete" view (this is from the NerdDiner example, btw):&lt;br /&gt;&lt;pre class="code"&gt;&amp;lt;h2&amp;gt;Delete Confirmation&amp;lt;/h2&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;div&amp;gt;&lt;br /&gt;    &amp;lt;p&amp;gt;Please confirm you want to delete the product titled: &lt;br /&gt;    &amp;lt;i&amp;gt; &amp;lt;%= Html.Encode(Model.ProductName) %&amp;gt;?&amp;lt;/i&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;% &lt;span class="kwrd"&gt;using&lt;/span&gt; (Html.BeginForm())&lt;br /&gt;   { %&amp;gt;&lt;br /&gt;   &lt;br /&gt;   &amp;lt;input name=&lt;span class="str"&gt;"confirmButton"&lt;/span&gt; type=&lt;span class="str"&gt;"submit"&lt;/span&gt; &lt;span class="kwrd"&gt;value&lt;/span&gt;=&lt;span class="str"&gt;"Delete"&lt;/span&gt; /&amp;gt;&lt;br /&gt;   &lt;br /&gt;&amp;lt;% } %&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;ActionResult: Delete&lt;/b&gt; (From a Post request)&lt;br /&gt;Ok, now we are starting to build on the MVC framework a bit.  The code below shows the Post request coming back from the "Delete" view saying "Delete this Product".  Using the &lt;em&gt;&lt;strong&gt;[AcceptVerbs(HttpVerbs.Post)], &lt;/strong&gt;&lt;/em&gt;we tell the method to be on the lookout for a Post coming from the "Delete" view with the parameters for the &lt;strong&gt;productID&lt;/strong&gt;, and the &lt;strong&gt;string value &lt;/strong&gt;of the confirmButton.&lt;br /&gt;&lt;pre class="code"&gt;&lt;span class="rem"&gt;//&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;// HTTP POST: /Products/Delete/1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;[AcceptVerbs(HttpVerbs.Post)]&lt;br /&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; ActionResult Delete(&lt;span class="kwrd"&gt;int&lt;/span&gt; id, &lt;span class="kwrd"&gt;string&lt;/span&gt; confirmButton)&lt;br /&gt;{&lt;br /&gt;    &lt;span class="rem"&gt;// Get Product&lt;/span&gt;&lt;br /&gt;    var _repo = &lt;span class="kwrd"&gt;new&lt;/span&gt; SimpleRepository();&lt;br /&gt;    Product product = _repo.Single&amp;lt;Product&amp;gt;(id);&lt;br /&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;if&lt;/span&gt; (product == &lt;span class="kwrd"&gt;null&lt;/span&gt;)&lt;br /&gt;    {&lt;br /&gt;        &lt;span class="kwrd"&gt;return&lt;/span&gt; View(&lt;span class="str"&gt;"NotFound"&lt;/span&gt;);&lt;br /&gt;    }&lt;br /&gt;    &lt;span class="kwrd"&gt;else&lt;/span&gt;&lt;br /&gt;    {&lt;br /&gt;        _repo.Delete&amp;lt;Product&amp;gt;(id);&lt;br /&gt;        &lt;span class="kwrd"&gt;return&lt;/span&gt; View(&lt;span class="str"&gt;"Deleted"&lt;/span&gt;);&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;ActionResult: Create&lt;/b&gt;&lt;br /&gt;Like the other views, Right-Click on the "Create" to the right of the "ActionResult" to Add the "Create" View.  Be sure to select your "&lt;strong&gt;Products&lt;/strong&gt;" &lt;strong&gt;data class&lt;/strong&gt; and the "&lt;strong&gt;Create&lt;/strong&gt;" for &lt;strong&gt;view content&lt;/strong&gt;.  I won't bother you anymore with screen shots of adding the view since it's pretty redundant.  The purpose of this simple "Create" view is merely to redirect you to the View itself.  &lt;br /&gt;&lt;br /&gt;&lt;b&gt;jQuery Validation&lt;/b&gt; (I know, it's about time right)&lt;br /&gt;The jQuery Validation is very cool stuff.  It's a plugin for the jQuery framework, and makes client-side validation a breeze.  Check out the code below on how to add it to your View for some quick validation.&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;First things first: update your &lt;strong&gt;using {Html.BeginForm()}&lt;/strong&gt; tag like the following code (below).  We need to give the form a name so jQuery knows how to talk to it.&lt;br /&gt;&lt;pre class="csharpcode"&gt;&amp;lt;% &lt;span class="kwrd"&gt;using&lt;/span&gt; (Html.BeginForm(&lt;span class="str"&gt;"Create"&lt;/span&gt;, &lt;span class="str"&gt;"Products"&lt;/span&gt;, FormMethod.Post, &lt;span class="kwrd"&gt;new&lt;/span&gt; { id = &lt;span class="str"&gt;"Form1"&lt;/span&gt; }))&lt;br /&gt;       {%&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;li&gt;Next, you need to reference both the jquery-1.3.2.js and jquery.validate.js classes, then add your jQuery code below it.  In the code below, I'm doing validation on the &lt;strong&gt;ProductName&lt;/strong&gt; field and the &lt;strong&gt;UnitsInStock&lt;/strong&gt; field.  You can obviously add more fields and changed them out.&lt;br /&gt;&lt;pre class="code"&gt;&amp;lt;script src=&lt;span class="str"&gt;"../../Scripts/jquery-1.3.2.js"&lt;/span&gt; type=&lt;span class="str"&gt;"text/javascript"&lt;/span&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;script src=&lt;span class="str"&gt;"../../Scripts/jquery.validate.js"&lt;/span&gt; type=&lt;span class="str"&gt;"text/javascript"&lt;/span&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;script type=&lt;span class="str"&gt;"text/javascript"&lt;/span&gt; language=&lt;span class="str"&gt;"javascript"&lt;/span&gt;&amp;gt; &lt;br /&gt;    $(document).ready(function(){&lt;br /&gt;        $(&lt;span class="str"&gt;"#Form1"&lt;/span&gt;).validate({&lt;br /&gt;            rules: {&lt;br /&gt;                ProductName: {&lt;br /&gt;                    required: &lt;span class="kwrd"&gt;true&lt;/span&gt;,&lt;br /&gt;                    minlength: 2&lt;br /&gt;                },&lt;br /&gt;                UnitsInStock: {&lt;br /&gt;                    required: &lt;span class="kwrd"&gt;true&lt;/span&gt;&lt;br /&gt;                }&lt;br /&gt;            },&lt;br /&gt;            messages: {&lt;br /&gt;                ProductName: {&lt;br /&gt;                    required: &lt;span class="str"&gt;"* Required"&lt;/span&gt;,&lt;br /&gt;                    minlength: &lt;span class="str"&gt;"* Minimum (2) Characters Required"&lt;/span&gt;&lt;br /&gt;                },&lt;br /&gt;                UnitsInStock: {&lt;br /&gt;                    required: &lt;span class="str"&gt;"* Required"&lt;/span&gt;&lt;br /&gt;                }   &lt;br /&gt;            }     &lt;br /&gt;        });&lt;br /&gt;    })&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;The jQuery doesn't require anymore then that code above.  You don't have to touch your fields in the HTML code.  It will automatically valid on the designated form's Post.  Also, it means that you can leave your pre-built server-side validation in place that the MVC framework has built for you.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;ActionResult: Create&lt;/b&gt; (From a Post response)&lt;br /&gt;Now that we have our "Create" view setup, we need to handle it.  If you view the code below, this is doing several things:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Sets up the database connection via SimpleRepository (SubSonic 3)&lt;br /&gt;&lt;li&gt;Sets up the entities via new Product()&lt;br /&gt;&lt;li&gt;Uses the "&lt;strong&gt;UpdateModel(&lt;em&gt;[entity class]&lt;/em&gt;)&lt;/strong&gt;" from the MVC framework to grab all of the &lt;strong&gt;Request.Form &lt;/strong&gt;data (very cool)&lt;br /&gt;&lt;li&gt;If successful, it redirects them to the "&lt;strong&gt;Details&lt;/strong&gt;" view along with the new &lt;strong&gt;productID&lt;/strong&gt; of the product added.&lt;br /&gt;&lt;li&gt;If not successful, it puts them back to the &lt;strong&gt;originating view&lt;/strong&gt; (in this case "Create" view), along with the &lt;strong&gt;Error Message &lt;/strong&gt;which fires up the &lt;strong&gt;Validation Summary&lt;/strong&gt;, highlights the fields in question along with their individual error messages.&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span class="rem"&gt;//&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;// POST: /Products/Create&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;[AcceptVerbs(HttpVerbs.Post)]&lt;br /&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; ActionResult Create(FormCollection collection)&lt;br /&gt;{&lt;br /&gt;    &lt;span class="rem"&gt;// Add Product&lt;/span&gt;&lt;br /&gt;    var _repo = &lt;span class="kwrd"&gt;new&lt;/span&gt; SimpleRepository();&lt;br /&gt;    Product item = &lt;span class="kwrd"&gt;new&lt;/span&gt; Product();&lt;br /&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;try&lt;/span&gt;&lt;br /&gt;    {&lt;br /&gt;        UpdateModel(item);&lt;br /&gt;        _repo.Add&amp;lt;Product&amp;gt;(item);&lt;br /&gt;&lt;br /&gt;        &lt;span class="kwrd"&gt;return&lt;/span&gt; RedirectToAction(&lt;span class="str"&gt;"Details"&lt;/span&gt;, &lt;span class="kwrd"&gt;new&lt;/span&gt; { id = item.ProductID });&lt;br /&gt;    }&lt;br /&gt;    &lt;span class="kwrd"&gt;catch&lt;/span&gt; (Exception ex)&lt;br /&gt;    {&lt;br /&gt;        ModelState.AddModelError(&lt;span class="str"&gt;"Error"&lt;/span&gt;, ex.Message);&lt;br /&gt;    }&lt;br /&gt;    &lt;span class="kwrd"&gt;return&lt;/span&gt; View(item);&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;ActionResult: Edit&lt;/b&gt;&lt;br /&gt;If you had a mashup between the "Details" and the "Create" view, you would have the "Edit" view.  Same as before, get the data, load it into the Entity, and then pass it to the view model.  Just like the "Create" view, you can add your jQuery Validation to this page the same way.  Just cut and paste!&lt;br /&gt;&lt;pre class="code"&gt;&lt;span class="rem"&gt;//&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;// GET: /Products/Edit/5&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; ActionResult Edit(&lt;span class="kwrd"&gt;int&lt;/span&gt; id)&lt;br /&gt;{&lt;br /&gt;    &lt;span class="rem"&gt;// Get Product&lt;/span&gt;&lt;br /&gt;    var _repo = &lt;span class="kwrd"&gt;new&lt;/span&gt; SimpleRepository();&lt;br /&gt;    Product item = _repo.Single&amp;lt;Product&amp;gt;((x =&amp;gt; x.ProductID == id));&lt;br /&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;if&lt;/span&gt; (item == &lt;span class="kwrd"&gt;null&lt;/span&gt;)&lt;br /&gt;    {&lt;br /&gt;        &lt;span class="kwrd"&gt;return&lt;/span&gt; View(&lt;span class="str"&gt;"NotFound"&lt;/span&gt;);&lt;br /&gt;    }&lt;br /&gt;    &lt;span class="kwrd"&gt;else&lt;/span&gt;&lt;br /&gt;    {&lt;br /&gt;        &lt;span class="kwrd"&gt;return&lt;/span&gt; View(&lt;span class="str"&gt;"Edit"&lt;/span&gt;, item);&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;ActionResult: Edit&lt;/b&gt; (From a Post response)&lt;br /&gt;This is just like intercepting the Post response from a "Create" View, but "Edit".  Here you notice that we can reuse the "UpdateModel" courtesy of the MVC Framework.  SubSonic 3 just has the "Update" in lieu of "Add".&lt;br /&gt;&lt;pre class="code"&gt;&lt;span class="rem"&gt;//&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;// POST: /Products/Edit/5&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;[AcceptVerbs(HttpVerbs.Post)]&lt;br /&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; ActionResult Edit(&lt;span class="kwrd"&gt;int&lt;/span&gt; id, FormCollection collection)&lt;br /&gt;{&lt;br /&gt;    &lt;span class="rem"&gt;// Update Product&lt;/span&gt;&lt;br /&gt;    var _repo = &lt;span class="kwrd"&gt;new&lt;/span&gt; SimpleRepository();&lt;br /&gt;    Product item = _repo.Single&amp;lt;Product&amp;gt;((x =&amp;gt; x.ProductID == id));&lt;br /&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;try&lt;/span&gt;&lt;br /&gt;    {                &lt;br /&gt;        UpdateModel(item);&lt;br /&gt;        _repo.Update&amp;lt;Product&amp;gt;(item);&lt;br /&gt;&lt;br /&gt;       &lt;span class="kwrd"&gt;return&lt;/span&gt; RedirectToAction(&lt;span class="str"&gt;"Details"&lt;/span&gt;, &lt;span class="kwrd"&gt;new&lt;/span&gt; { id=item.ProductID });&lt;br /&gt;    }&lt;br /&gt;    &lt;span class="kwrd"&gt;catch&lt;/span&gt; (Exception ex)&lt;br /&gt;    {&lt;br /&gt;        ModelState.AddModelError(&lt;span class="str"&gt;"Error"&lt;/span&gt;, ex.Message);&lt;br /&gt;    }&lt;br /&gt;    &lt;span class="kwrd"&gt;return&lt;/span&gt; View(item);&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;I hope that with the SubSonic 3 with MVC and jQuery Example it helps you get started with MVC and SubSonic 3, this more complete example would have made it a bit easier for me learning it I know. :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/954701964661625078-5194209720395135832?l=www.jwc3.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/p5ZitEzReKq5dmT5H-Jk4b8r92g/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/p5ZitEzReKq5dmT5H-Jk4b8r92g/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/p5ZitEzReKq5dmT5H-Jk4b8r92g/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/p5ZitEzReKq5dmT5H-Jk4b8r92g/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/JamesSandbox/~4/XzeLW6DW1m0" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/JamesSandbox/~3/XzeLW6DW1m0/subsonic-3-with-mvc-and-jquery-example_01.html</link><author>noreply@blogger.com (James Curtis)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_BVcJoi56t9c/SsUE4rK5p7I/AAAAAAAAANU/eh_trOBqMfY/s72-c/mvc_add_details.jpg" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><feedburner:origLink>http://www.jwc3.net/2009/10/subsonic-3-with-mvc-and-jquery-example_01.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-954701964661625078.post-4755670521641858965</guid><pubDate>Thu, 01 Oct 2009 12:30:00 +0000</pubDate><atom:updated>2009-10-01T16:48:14.038-04:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">MVC</category><category domain="http://www.blogger.com/atom/ns#">SubSonic</category><category domain="http://www.blogger.com/atom/ns#">Examples</category><category domain="http://www.blogger.com/atom/ns#">jQuery</category><title>SubSonic 3 with MVC and jQuery - Example (Part 1)</title><description>SubSonic 3, MVC and jQuery, like it was planned.  Well, for me at least, it is a beautiful thing.  I have been a big follower of SubSonic for many years now, most notably the 2.xx releases.  SubSonic 3 has been out for a bit this year, and I thought that I would take a look.  Turns out, it's a total rewrite (which is good in this case) that allows it to be more powerful.  No more writing batch files to get your DAL files.  I'd also like to give a big thanks to &lt;a href="http://blog.wekeroad.com/"&gt;Rob Conery&lt;/a&gt; for &lt;a href="http://subsonicproject.com"&gt;SubSonic&lt;/a&gt;.  Also, the guys (including Rob) at Microsoft that created "&lt;a href="http://nerddinner.codeplex.com/"&gt;Nerd Dinner&lt;/a&gt;" and wrote a nice walkthrough realy helped get started.&lt;br /&gt;&lt;br /&gt;If you want to skip to &lt;a href="http://www.jwc3.net/2009/10/subsonic-3-with-mvc-and-jquery-example_01.html"&gt;Part 2&lt;/a&gt;, you are more than welcome.  :)&lt;br /&gt;&lt;br /&gt;If you would like to download my example project, &lt;a href="http://jump.fm/MVWLC"&gt;click here&lt;/a&gt; (look in the lower right corner of the page for the download link).  This includes the good old Northwind database running locally in SQL Express.  I also have included some files in the project that are "turned off" that match some of the Nerd Dinner files if you are looking to expand this example for yourself. :)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Things you will need for this setup:&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.microsoft.com/express/"&gt;Visual Studio&lt;/a&gt; &lt;br /&gt;&lt;li&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=333325FD-AE52-4E35-B531-508D977D32A6&amp;displaylang=en"&gt;.NET Framework 3.5&lt;/a&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.asp.net/mvc/download/"&gt;ASP.NET MVC 1.0&lt;/a&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://plugins.jquery.com/project/validate"&gt;jQuery Validate&lt;/a&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://subsonicproject.com/Download"&gt;SubSonic 3&lt;/a&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;So, to get SubSonic setup in your solution:&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://subsonicproject.com/Download"&gt;Download SubSonic 3&lt;/a&gt;&lt;br /&gt;&lt;li&gt;Extract the zip file and place the SubSonic folder on your local drive.&lt;br /&gt;&lt;li&gt;Create a class library project and add a reference to SubSonic.Core.dll&lt;br /&gt;&lt;li&gt;Simply drop the T4 (aka "tt") templates in your class library.&lt;br /&gt;&lt;li&gt;Add an app.config and a database connection string configure the ".ttinclude" file to point to your database and connection string.&lt;br /&gt;&lt;li&gt;After that, right-click on each of the "tt" files, and then click "Run Custom Tool" in Visual Studio.  Very easy.&lt;br /&gt;&lt;li&gt;Compile the project and you're good to go.&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;b&gt;Here is what the database connection part of the "Settings.ttinclude" looks like:&lt;/b&gt;&lt;pre class="code"&gt;&lt;span class="kwrd"&gt;const&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; Namespace = &lt;span class="str"&gt;"SubSonic.MVC.DataAccess"&lt;/span&gt;;&lt;br /&gt;&lt;span class="kwrd"&gt;const&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; ConnectionStringName = &lt;span class="str"&gt;"NorthwindConnectionString"&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&lt;span class="rem"&gt;//This is the name of your database and is used in naming&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;//the repository. By default we set it to the connection string name&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;const&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; DatabaseName = &lt;span class="str"&gt;"Northwnd"&lt;/span&gt;;&lt;/pre&gt;&lt;br /&gt;It's worth noting that the "SubSonic.MVC.DataAccess" Namespace can be &lt;em&gt;&lt;strong&gt;anything&lt;/strong&gt;&lt;/em&gt; that you want.  So, if you want to call your Namespace "MonkeyCode.Bananas.DAL" you are more than welcome to do so.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The best advice I have for this is to loosely follow along in the "Nerd Dinner" pdf on building your ASP.NET MVC app.  There is really no point for me to recreate the wheel that they have built.  :)  &lt;a href="http://www.wrox.com/WileyCDA/Section/id-321793.html"&gt;Download the PDF&lt;/a&gt;.  What I will do is show examples of using SubSonic 3, MVC and jQuery to List, Detail, Insert, Update and Delete from the Products table in the NorthWind database.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Start Here (Setup):&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;After you have downloaded SubSonic 3, installed MVC 1.0 and .NET 3.5, and setup your data access class library with SubSonic 3 (from above):&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Add a new project to the solution&lt;br /&gt;&lt;li&gt;Go to Visual C# &gt; Web &gt; ASP.NET MVC Web Application&lt;br /&gt;&lt;li&gt;For this example, name it WebApp and say OK&lt;br /&gt;&lt;li&gt;&lt;i&gt;This will add and build your MVC Web App and create a Unit Test project for you&lt;/i&gt;&lt;/ul&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;b&gt;Modify the Master Page:&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;In the WebApp, go to Views &gt; Shared &gt; Site.Master and open it&lt;br /&gt;&lt;li&gt;Look for the menu links in the code and modify it like the example (below):&lt;pre class="code"&gt;&amp;lt;ul id=&lt;span class="str"&gt;"menu"&lt;/span&gt;&amp;gt;              &lt;br /&gt;    &amp;lt;li&amp;gt;&amp;lt;%= Html.ActionLink(&lt;span class="str"&gt;"Home"&lt;/span&gt;, &lt;span class="str"&gt;"Index"&lt;/span&gt;, &lt;span class="str"&gt;"Home"&lt;/span&gt;)%&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;    &amp;lt;li&amp;gt;&amp;lt;%= Html.ActionLink(&lt;span class="str"&gt;"About"&lt;/span&gt;, &lt;span class="str"&gt;"About"&lt;/span&gt;, &lt;span class="str"&gt;"Home"&lt;/span&gt;)%&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;    &amp;lt;li&amp;gt;&amp;lt;%= Html.ActionLink(&lt;span class="str"&gt;"Products"&lt;/span&gt;, &lt;span class="str"&gt;"Index"&lt;/span&gt;, &lt;span class="str"&gt;"Products"&lt;/span&gt;)%&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;&amp;lt;/ul&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;b&gt;Add the Product Controller class:&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Right-Click the Controllers folder &gt; Add New Controller&lt;br /&gt;&lt;li&gt;Type in ProductsController for the name and check the checkbox for "Add action methods for Create, Update, and Details scenarios"&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;b&gt;Setup Your Index View:&lt;/b&gt;&lt;br /&gt;This is the heart of your Controller -- the Index.  This is the default view that will show when someone goes to [yourdomain]/Products.  First, what we'll do is query the Products table via SubSonic and then pass the list to the view. See the code below:&lt;pre class="code"&gt;&lt;span class="rem"&gt;// DB Setup used for some actions&lt;/span&gt;&lt;br /&gt;NorthwndDB db = &lt;span class="kwrd"&gt;new&lt;/span&gt; NorthwndDB();&lt;br /&gt;&lt;br /&gt;&lt;span class="rem"&gt;// SubSonic query&lt;/span&gt;&lt;br /&gt;SqlQuery sQuery = db&lt;br /&gt;    .Select&lt;br /&gt;    .From(&lt;span class="str"&gt;"Products"&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;var products = sQuery.ExecuteTypedList&amp;lt;Product&amp;gt;();&lt;br /&gt;&lt;br /&gt;&lt;span class="rem"&gt;// Pass the list (aka Model) to the view&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;return&lt;/span&gt; View(&lt;span class="str"&gt;"Index"&lt;/span&gt;, products);&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;Create the Index View:&lt;/b&gt;&lt;br /&gt;Ok, this is really easy, just Right-Click on the Index() next to the ActionResult like in the image below.&lt;a href="http://4.bp.blogspot.com/_BVcJoi56t9c/SsS0INDZDhI/AAAAAAAAANE/dnJo53WI0FQ/s1600-h/mvc_add_index.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 353px;" src="http://4.bp.blogspot.com/_BVcJoi56t9c/SsS0INDZDhI/AAAAAAAAANE/dnJo53WI0FQ/s400/mvc_add_index.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5387629107277794834" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Next, make sure the view name is "Index" and check "Create a strongly-typed view".  Select your [SubSonic Namespace].Product data class from the list and finally choose "List" under View Content (see image below). &lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_BVcJoi56t9c/SsS09JWkLkI/AAAAAAAAANM/0JgRfftl09U/s1600-h/mvc_add_index2.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 349px; height: 382px;" src="http://3.bp.blogspot.com/_BVcJoi56t9c/SsS09JWkLkI/AAAAAAAAANM/0JgRfftl09U/s400/mvc_add_index2.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5387630016817540674" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;What happens is that Visual Studio will automatically create the folder "Products" under the "Views" folder and then create "Index.aspx" (i.e. /Views/Products/index.aspx) which is your Index view.  Also, because you specified the &lt;strong&gt;data class&lt;/strong&gt; and "list" type of view, it automatically created your HTML with all the fields from your data class.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;em&gt;Things to Note:&lt;/em&gt;&lt;/b&gt;&lt;br /&gt;If you look at the top of the page in the code, it will look like this: &lt;pre class="code"&gt;&amp;lt;%@ Page Title=&lt;span class="str"&gt;""&lt;/span&gt; Language=&lt;span class="str"&gt;"C#"&lt;/span&gt; &lt;br /&gt;MasterPageFile=&lt;span class="str"&gt;"~/Views/Shared/Site.Master"&lt;/span&gt; &lt;br /&gt;Inherits=&lt;span class="str"&gt;"System.Web.Mvc.ViewPage&amp;lt;IEnumerable&amp;lt;SubSonic.MVC.DataAccess.Product&amp;gt;&amp;gt;"&lt;/span&gt; %&amp;gt;&lt;/pre&gt;&lt;br /&gt;Notice that the "Inherits" property specifies the System.Web.Mvc.ViewPage Namespace and then breaks down further with &lt;strong&gt;IEnumerable&lt;/strong&gt; and the &lt;strong&gt;actual data class&lt;/strong&gt; from there.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Other things to note are:&lt;/strong&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The &lt;strong&gt;Model&lt;/strong&gt; is inherited from the "product" class passed from the ProductsController.  So, basically it's the same as saying "foreach (var product in products)."&lt;br /&gt;&lt;pre class="code"&gt;&amp;lt;% &lt;span class="kwrd"&gt;foreach&lt;/span&gt; (var item &lt;span class="kwrd"&gt;in&lt;/span&gt; Model) { %&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;li&gt;Links to other Views while passing the id of the current record are done like so:&lt;br /&gt;&lt;pre class="code"&gt;&amp;lt;a href=&lt;span class="str"&gt;"&amp;lt;%=Url.Action("&lt;/span&gt;Details&lt;span class="str"&gt;", new { id = item.ProductID })%&amp;gt;"&lt;/span&gt;&amp;gt;View Details&amp;lt;/a&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;li&gt;Entity fields are displayed like this (reminds me of Classic ASP):&lt;br /&gt;&lt;pre class="code"&gt;&amp;lt;%= Html.Encode(item.ProductID) %&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;li&gt;Stand-alone, all inclusive links can be done like this:&lt;br /&gt;&lt;pre class="csharpcode"&gt;&amp;lt;%= Html.ActionLink(&lt;span class="str"&gt;"Create New"&lt;/span&gt;, &lt;span class="str"&gt;"Create"&lt;/span&gt;) %&amp;gt;&lt;/pre&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;At this point, you should be able to run your MVC web site and view the Products list (aka "Index") page.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.jwc3.net/2009/10/subsonic-3-with-mvc-and-jquery-example_01.html"&gt;View the Part 2 of the Series.&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/954701964661625078-4755670521641858965?l=www.jwc3.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/SmHxuZyuq3dGYQ2vBIuaFkQVdvU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/SmHxuZyuq3dGYQ2vBIuaFkQVdvU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/SmHxuZyuq3dGYQ2vBIuaFkQVdvU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/SmHxuZyuq3dGYQ2vBIuaFkQVdvU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/JamesSandbox/~4/YIB0oRqgkRg" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/JamesSandbox/~3/YIB0oRqgkRg/subsonic-3-with-mvc-and-jquery-example.html</link><author>noreply@blogger.com (James Curtis)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_BVcJoi56t9c/SsS0INDZDhI/AAAAAAAAANE/dnJo53WI0FQ/s72-c/mvc_add_index.jpg" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.jwc3.net/2009/10/subsonic-3-with-mvc-and-jquery-example.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-954701964661625078.post-3689807658841948483</guid><pubDate>Mon, 22 Jun 2009 12:33:00 +0000</pubDate><atom:updated>2009-06-22T09:10:43.675-04:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">SharePoint</category><title>Sharepoint 2010 (#14) - Some goodies for us designers</title><description>SharePoint 2010 &lt;em&gt;will not support&lt;/em&gt; Internet Explorer 6 (&lt;a href="http://blogs.msdn.com/sharepoint/archive/2009/05/07/announcing-sharepoint-server-2010-preliminary-system-requirements.aspx"&gt;more info&lt;/a&gt;).  So, what this means to us designers is that we won't have to &lt;em&gt;bow down&lt;/em&gt; to the confines of IE6's lack of &lt;a href="http://snook.ca/archives/html_and_css/six_keys_to_understanding_css_layouts/"&gt;modern CSS&lt;/a&gt; layouts.  We can use things like &lt;strong&gt;&lt;em&gt;.myCSS TD:first-child&lt;/em&gt;&lt;/strong&gt; which is only supported in IE7+ (for IE -- FireFox and others support this).&lt;br /&gt;&lt;br /&gt;Another feature that we'll be sure to use and hack the styles of are the the &lt;a href="http://blog.sharepointproducts.com/archive/2009/05/12/microsoft-sharepoint-2010-news-from-teched-us-2009.aspx"&gt;Web-enabled Ribbon control&lt;/a&gt;.  I'm sure that we'll be pushing the limits to make these ribbons do our bidding in our SP 2010 sites.&lt;br /&gt;&lt;br /&gt;Cheers.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/954701964661625078-3689807658841948483?l=www.jwc3.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/RC0yybAqj1O208p8uwQiPFtINYM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/RC0yybAqj1O208p8uwQiPFtINYM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/RC0yybAqj1O208p8uwQiPFtINYM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/RC0yybAqj1O208p8uwQiPFtINYM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/JamesSandbox/~4/8zKr5mVOTgE" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/JamesSandbox/~3/8zKr5mVOTgE/sharepoint-2010-14-some-goodies-for-us.html</link><author>noreply@blogger.com (James Curtis)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.jwc3.net/2009/06/sharepoint-2010-14-some-goodies-for-us.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-954701964661625078.post-7908121344298108279</guid><pubDate>Sun, 17 May 2009 23:53:00 +0000</pubDate><atom:updated>2009-05-17T20:54:07.655-04:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Presentations</category><category domain="http://www.blogger.com/atom/ns#">other stuff</category><category domain="http://www.blogger.com/atom/ns#">IndyNDA</category><title>Designing for SharePoint (Indy Code Camp Presentation)</title><description>I was excited to see a great turnout this weekend for Indy Code Camp (and even more for my presentation :) ).  In my presentation, "Designing for SharePoint", I talked about taking a Graphic Design and converting it into a Master Page, Page Layouts and Web Parts to get the vision of the company.  Below are some notes and links to sites that should be useful for those looking to follow the same pattern.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Graphic Designs&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;If you're a designer, you probably already have a graphics program that you use for your designs, but if you are not, then you probably would like some guidance in this area.  My preference is &lt;a href="http://www.adobe.com/products/fireworks/"&gt;Adobe Fireworks&lt;/a&gt; which I have used for many years, back when the product was owned by Macromedia.  Fireworks is geared for developing graphics for web sites, and can also be used for dealing with photo images, etc.  &lt;a href="http://www.adobe.com/products/photoshop"&gt;Adobe Photoshop&lt;/a&gt; is another graphics program that is more powerful and more expensive than Fireworks.  This program is more useful for photo editing and effects, than being geared for the web.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Master Pages&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Master Pages: Love them, hate them -- either way they are an intregal part of SharePoint.  You need to develop these bad boys so that the top Internet Browsers will show the SharePoint site the same way (for the most part).  So, either start with the default.master (can be found by connecting to the SharePoint site via SharePoint Designer, then navigate to _catalogs/masterpages/ directory). WSS will just have the one master page "default.master" and MOSS will have multiple master pages.&lt;br /&gt;&lt;br /&gt;Heather Solomon (SharePoint Design Guru) has created a minimal master page.  You can &lt;a href="http://www.heathersolomon.com/blog/archive/2007/01/26/6153.aspx"&gt;download&lt;/a&gt; it to start out your new master page.  Remember that you will want to keep a hold of all the Content Place Holders of the master page.  If you are not going to use them, just put them in a hidden ASP:Panel.  &lt;br /&gt;&lt;br /&gt;Other parts of the master page that you will want to pay attention to are:&lt;br /&gt;&lt;br /&gt;&lt;li&gt;Welcome Bar (My Site / My Links / Site Actions button)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Main Navigation (this can be replaced with a Telerik RAD menu for instance)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Publishing Console (if using MOSS)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Quick Navigation Menu (used as the vertical navigation bar -- usually MOSS sites hide this)&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Page Layouts&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Page Layouts can also be found in the folder _catalogs/masterpages and are identified by the .ASPX file extension.  Page Layouts inherit from a master page, and control structure of Web Part Zones AND are tied to a specific Content Type (Welcome, Article, etc., or a Custom Content Type).  These are pretty straight forward as they are a mix of HTML and Sharepoint controls.  You can create many page layouts for your SharePoint sites.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Modifying Out of the Box (OOTB) Web Parts&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;This is one of those things that gets debated by SharePoint developers as to the true use of OOTB Web Parts.  Some purists believe that custom web parts should be left to only .NET web parts.  Depending on the needs of the web part, .NET could be the way to do.  However, if you are looking to extend a web part that can be mostly handled by modifying a DataFormWebPart in SharePoint Designer, this can cut way down on time and frustration from NOT having to develop a .NET web part.  &lt;br /&gt;&lt;br /&gt;Here is a quick list of how you create and modify an OOTB Web Part to do your bidding on SharePoint.&lt;br /&gt;&lt;br /&gt;1) Open SharePoint Designer and connect to your SharePoint site&lt;br /&gt;&lt;br /&gt;2) Click on File &gt; New and create a new .ASPX page that inherits from your Master Page&lt;br /&gt;&lt;br /&gt;3) In the new page, go into the code view and create a new &amp;lt;DIV&amp;gt; tag (for Table)&lt;br /&gt;&lt;br /&gt;4) (In Design View) Click in the center of your new tag so the cursor is within your tag&lt;br /&gt;&lt;br /&gt;5) Click on Insert &gt; SharePoint &gt; Web Part Zone (must be in Design View)&lt;br /&gt;&lt;br /&gt;6) Click on DataFormWebPart &gt; Insert to insert a new DataFormWebPart&lt;br /&gt;&lt;br /&gt;... Follow the instructions on connecting to the datasource in SharePoint Designer&lt;br /&gt;&lt;br /&gt;7) If you want to add columns, you can by right-clicking on any of the column headers you want, and choosing to insert a column to the right or left&lt;br /&gt;&lt;br /&gt;8) At this point, before you do anything else, you should hop in the code and look for "ListID" and replace this with "ListName".  Also, you will want to find the corresponding "ListID" "Guid" and replace this with the actual list name.  Doing this will ensure that this web part can be deployed across different environment whereas a ListID and Guid would fail.&lt;br /&gt;&lt;br /&gt;9) Click in the header of the web part so it's all highlighted&lt;br /&gt;&lt;br /&gt;10) Click on File &gt; Export &gt; Save Web Part &gt; To Site Gallery (this will import the current web part into the Site Gallery on your SharePoint server -- it puts it in the "Miscellaneous" category by the way)&lt;br /&gt;&lt;br /&gt;That's it.  If you have any questions, feel free to contact me.&lt;br /&gt;&lt;br /&gt;:)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/954701964661625078-7908121344298108279?l=www.jwc3.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/wCbhnV2tUHCnrPk-rjVYGBE8gY0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/wCbhnV2tUHCnrPk-rjVYGBE8gY0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/wCbhnV2tUHCnrPk-rjVYGBE8gY0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/wCbhnV2tUHCnrPk-rjVYGBE8gY0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/JamesSandbox/~4/KfGBSXQdhrQ" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/JamesSandbox/~3/KfGBSXQdhrQ/designing-for-sharepoint-indy-code-camp.html</link><author>noreply@blogger.com (James Curtis)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.jwc3.net/2009/05/designing-for-sharepoint-indy-code-camp.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-954701964661625078.post-1469433812935470588</guid><pubDate>Thu, 02 Apr 2009 12:40:00 +0000</pubDate><atom:updated>2009-04-02T08:46:45.883-04:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">.NET</category><category domain="http://www.blogger.com/atom/ns#">SharePoint</category><category domain="http://www.blogger.com/atom/ns#">WebParts</category><category domain="http://www.blogger.com/atom/ns#">CAML</category><category domain="http://www.blogger.com/atom/ns#">MOSS 2007</category><title>Filter Current User for Document Library in a CAML Query</title><description>I had a situation where I needed to create a web part that searched all of the Document Libraries of a SharePoint site, and then gave the option to filter the list by the current user logged onto the site (similar to the "Relavent Documents" OOTB Web Part).&lt;br /&gt;&lt;br /&gt;Anyways, the CAML Query is simplistic in nature, but was kind of a pain to reach this conclusion since most of what you will find on the Web is using the "AssignedTo" Field name to match against the current user.  The key internal name field for a Document Library to use is "&lt;strong&gt;Editor&lt;/strong&gt;".&lt;br /&gt;&lt;br /&gt;Anyways, here is the "Where" clause I used to hit against the Document Libraries:&lt;br /&gt;&lt;pre class="code"&gt;SPSiteDataQuery q = &lt;span class="kwrd"&gt;new&lt;/span&gt; SPSiteDataQuery();&lt;br /&gt;&lt;br /&gt;q.ViewFields = &lt;span class="str"&gt;"&amp;lt;FieldRef Name=\"FileRef\" /&amp;gt;&amp;lt;FieldRef Name=\"ID\" /&amp;gt;&amp;lt;FieldRef Name=\"Modified\" /&amp;gt;&amp;lt;FieldRef Name=\"Modified_x0020_By\" /&amp;gt;"&lt;/span&gt;;&lt;br /&gt;q.Query = &lt;span class="str"&gt;"&amp;lt;Where&amp;gt;&amp;lt;Eq&amp;gt;&amp;lt;FieldRef Name=\"Editor\" /&amp;gt;&amp;lt;Value Type=\"User\"&amp;gt;&amp;lt;UserID/&amp;gt;&amp;lt;/Value&amp;gt;&amp;lt;/Eq&amp;gt;&amp;lt;/Where&amp;gt;&amp;lt;OrderBy&amp;gt;&amp;lt;FieldRef Name=\"Modified\" Ascending=\"False\" /&amp;gt;&amp;lt;/OrderBy&amp;gt;"&lt;/span&gt;;           &lt;br /&gt;q.RowLimit = 10;&lt;br /&gt;q.Webs = &lt;span class="str"&gt;"&amp;lt;Webs Scope=\"Recursive\" /&amp;gt;"&lt;/span&gt;;&lt;br /&gt;q.Lists = &lt;span class="str"&gt;"&amp;lt;Lists ServerTemplate=\"101\"/&amp;gt;"&lt;/span&gt;;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/954701964661625078-1469433812935470588?l=www.jwc3.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/z7Hn0jSw6YENc_9-1wZs3iaVSAs/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/z7Hn0jSw6YENc_9-1wZs3iaVSAs/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/z7Hn0jSw6YENc_9-1wZs3iaVSAs/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/z7Hn0jSw6YENc_9-1wZs3iaVSAs/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/JamesSandbox/~4/3IWsV7cp4sI" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/JamesSandbox/~3/3IWsV7cp4sI/filter-current-user-for-document.html</link><author>noreply@blogger.com (James Curtis)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><feedburner:origLink>http://www.jwc3.net/2009/04/filter-current-user-for-document.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-954701964661625078.post-3561026608520087252</guid><pubDate>Thu, 02 Apr 2009 12:31:00 +0000</pubDate><atom:updated>2009-04-02T08:35:21.657-04:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">.NET</category><category domain="http://www.blogger.com/atom/ns#">SharePoint</category><category domain="http://www.blogger.com/atom/ns#">WebParts</category><category domain="http://www.blogger.com/atom/ns#">MOSS 2007</category><title>SPWeb Collection: List Sites / Webs</title><description>I had an opportunity recently to make a web part that is like a site map to the entire site collection no matter where it was dropped on the SharePoint site.  I also made an option (not shown in code) that allows the "default starting site/web" to be overridden so that you can start from any site/web node and then show recursive webs from there.&lt;br /&gt;&lt;br /&gt;Enough talk, here's the code:&lt;br /&gt;&lt;pre class="code"&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System;&lt;br /&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Collections.Generic;&lt;br /&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Text;&lt;br /&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Web.UI.WebControls;&lt;br /&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Web.UI.WebControls.WebParts;&lt;br /&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; Microsoft.SharePoint;&lt;br /&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; Microsoft.SharePoint.WebPartPages;&lt;br /&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; Microsoft.SharePoint.Utilities;&lt;br /&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Data;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;namespace&lt;/span&gt; JamesCurtis.SharePoint.Examples&lt;br /&gt;{&lt;br /&gt;    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; SPWebCollectionExample : Microsoft.SharePoint.WebPartPages.WebPart&lt;br /&gt;    {&lt;br /&gt;        &lt;span class="preproc"&gt;#region&lt;/span&gt; Constants&lt;br /&gt;&lt;br /&gt;        &lt;span class="preproc"&gt;#endregion&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;        &lt;span class="preproc"&gt;#region&lt;/span&gt; Fields&lt;br /&gt;&lt;br /&gt;        Label lblDisplay = &lt;span class="kwrd"&gt;new&lt;/span&gt; Label();&lt;br /&gt;        Label lblError = &lt;span class="kwrd"&gt;new&lt;/span&gt; Label();&lt;br /&gt;        StringBuilder sb = &lt;span class="kwrd"&gt;new&lt;/span&gt; StringBuilder();&lt;br /&gt;&lt;br /&gt;        &lt;span class="preproc"&gt;#endregion&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;        &lt;span class="preproc"&gt;#region&lt;/span&gt; Delagates&lt;br /&gt;&lt;br /&gt;        &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; CreateChildControls()&lt;br /&gt;        {&lt;br /&gt;            &lt;span class="kwrd"&gt;try&lt;/span&gt;&lt;br /&gt;            {&lt;br /&gt;                &lt;span class="kwrd"&gt;base&lt;/span&gt;.CreateChildControls();&lt;br /&gt;&lt;br /&gt;                lblDisplay.Text = GetData(SPContext.Current.Site.Url);&lt;br /&gt;                &lt;span class="kwrd"&gt;this&lt;/span&gt;.Controls.Add(lblDisplay);&lt;br /&gt;            }&lt;br /&gt;            &lt;span class="kwrd"&gt;catch&lt;/span&gt; (Exception ex)&lt;br /&gt;            {&lt;br /&gt;                lblError.Text = ex.Message;&lt;br /&gt;                &lt;span class="kwrd"&gt;this&lt;/span&gt;.Controls.Add(lblError);&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;span class="preproc"&gt;#endregion&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;        &lt;span class="preproc"&gt;#region&lt;/span&gt; Private Methods&lt;br /&gt;&lt;br /&gt;        &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; GetData(&lt;span class="kwrd"&gt;string&lt;/span&gt; site)&lt;br /&gt;        {&lt;br /&gt;            &lt;span class="kwrd"&gt;using&lt;/span&gt; (SPSite s = &lt;span class="kwrd"&gt;new&lt;/span&gt; SPSite(site))&lt;br /&gt;            {&lt;br /&gt;                SPWebCollection swc = s.AllWebs;&lt;br /&gt;                &lt;span class="kwrd"&gt;for&lt;/span&gt; (&lt;span class="kwrd"&gt;int&lt;/span&gt; i = 0; i &amp;lt; swc.Count - 1; i++)&lt;br /&gt;                {&lt;br /&gt;                    sb.Append(SPEncode.HtmlEncode(swc[i].Url));&lt;br /&gt;                    sb.Append(&lt;span class="str"&gt;"&amp;lt;br/&amp;gt;"&lt;/span&gt;);                    &lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;            &lt;span class="kwrd"&gt;return&lt;/span&gt; sb.ToString();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;span class="preproc"&gt;#endregion&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;Happy Programming!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/954701964661625078-3561026608520087252?l=www.jwc3.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/5CjUr9MpbVjHp_Xcm9nXqNyC2No/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5CjUr9MpbVjHp_Xcm9nXqNyC2No/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/5CjUr9MpbVjHp_Xcm9nXqNyC2No/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5CjUr9MpbVjHp_Xcm9nXqNyC2No/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/JamesSandbox/~4/kOWJ4NQkgXI" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/JamesSandbox/~3/kOWJ4NQkgXI/spweb-collection-list-sites-webs.html</link><author>noreply@blogger.com (James Curtis)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.jwc3.net/2009/04/spweb-collection-list-sites-webs.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-954701964661625078.post-7518742463213611914</guid><pubDate>Fri, 27 Feb 2009 20:46:00 +0000</pubDate><atom:updated>2009-02-27T15:52:35.090-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">other stuff</category><title>RAID Controller Not Initializing on boot after restart</title><description>I ran into an interesting issue with an older Dell server that I have.  I tried to add some RAM to it, and one of the RAM sticks ended up being bad, but in the process of trying to boot up, it seems to have tried to load the BIOS information, but then failed when it hit the bad RAM.&lt;br /&gt;&lt;br /&gt;So, what it did, was reset the BIOS!  I didn't figure this out at first because I was getting nervous that the server would skip over the normal "Controller 0... Initializing..." part and then fail because it couldn't find a boot device.&lt;br /&gt;&lt;br /&gt;The fix:&lt;br /&gt;&lt;br /&gt;1) Start the Server&lt;br /&gt;&lt;br /&gt;2) Go into SETUP&lt;br /&gt;&lt;br /&gt;3) Go to INTEGRATED DEVICES&lt;br /&gt;&lt;br /&gt;4) Look for the SCSI Setup (was on the top of the window in my screens)&lt;br /&gt;&lt;br /&gt;5) Set the value to SCSI or RAID, depending on your setup&lt;br /&gt;&lt;br /&gt;6) Exit and Save from the BIOS&lt;br /&gt;&lt;br /&gt;Hopefully, if you situation is the same, this will fix it. :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/954701964661625078-7518742463213611914?l=www.jwc3.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/M-kQtKzmWBWLreILm0hdzGHCMxs/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/M-kQtKzmWBWLreILm0hdzGHCMxs/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/M-kQtKzmWBWLreILm0hdzGHCMxs/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/M-kQtKzmWBWLreILm0hdzGHCMxs/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/JamesSandbox/~4/OWOo2Bhj6MM" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/JamesSandbox/~3/OWOo2Bhj6MM/raid-controller-not-initializing-on.html</link><author>noreply@blogger.com (James Curtis)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.jwc3.net/2009/02/raid-controller-not-initializing-on.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-954701964661625078.post-1680652924584381983</guid><pubDate>Wed, 18 Feb 2009 21:10:00 +0000</pubDate><atom:updated>2009-02-18T16:18:31.353-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Sql Server</category><title>SQL Reporting Services - Service Unavailable</title><description>There you are, happy and excited that you are about to start using SQL Reporting Services, and then it happens... you navigate to your report server (typically http://localhost/Reports) and you get an ugly error "&lt;strong&gt;Service Unavailable&lt;/strong&gt;".&lt;br /&gt;&lt;br /&gt;The good news is that it's probably just a quarky .NET 2.0 install that is messing it up.  If it is, here's how to easily reinstall .NET 2.0 to make IIS happy:&lt;br /&gt;&lt;br /&gt;1) Go to &lt;strong&gt;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ &lt;/strong&gt;and copy the path in the "address bar" in Windows Explorer&lt;br /&gt;&lt;br /&gt;2) Go to &lt;strong&gt;Start &gt; Run &lt;/strong&gt;and type in &lt;strong&gt;CMD&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;3) In the Command Window, type: &lt;strong&gt;cd&lt;/strong&gt; (and then with your mouse, right-click on the window and then "Paste") -- the end result should be "cd C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727"&lt;br /&gt;&lt;br /&gt;4) Type: &lt;strong&gt;aspnet_regiis -i&lt;/strong&gt; and hit [enter]&lt;br /&gt;&lt;br /&gt;These steps will reinstall .NET 2.0 and should fix the Service Unavailable error.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/954701964661625078-1680652924584381983?l=www.jwc3.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/BdAxOv5wt_qf8-FPx62gfzpBE5s/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/BdAxOv5wt_qf8-FPx62gfzpBE5s/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/BdAxOv5wt_qf8-FPx62gfzpBE5s/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/BdAxOv5wt_qf8-FPx62gfzpBE5s/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/JamesSandbox/~4/2tNs4lQt34Y" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/JamesSandbox/~3/2tNs4lQt34Y/sql-reporting-services-service.html</link><author>noreply@blogger.com (James Curtis)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.jwc3.net/2009/02/sql-reporting-services-service.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-954701964661625078.post-113969789452510683</guid><pubDate>Fri, 16 Jan 2009 14:57:00 +0000</pubDate><atom:updated>2009-01-19T10:36:59.358-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">SubSonic</category><category domain="http://www.blogger.com/atom/ns#">LinqToSQL</category><title>SubSonic versus LinqToSQL: Simple Delete</title><description>Continuing the series, SubSonic versus LinqToSQL, this example shows a simple delete using SubSonic and then the equivalent using LinqToSQL.  It is worth to note that SubSonic has two ways to delete records, on just updates a bit field called "IsDeleted" and essentially turns the record "off" while the "Destroy" method actually deletes the record.&lt;br /&gt;&lt;br /&gt;If you are looking for other posts in this series, here is the list:&lt;br /&gt; &lt;li&gt;&lt;a href="http://www.jwc3.net/2009/01/subsonic-versus-linktosql-simple-select.html"&gt;SubSonic versus LinqToSQL: Simple Select&lt;/a&gt;&lt;/li&gt;&lt;br /&gt; &lt;li&gt;&lt;a href="http://www.jwc3.net/2009/01/subsonic-versus-linktosql-simple-insert.html"&gt;SubSonic versus LinqToSQL: Simple Insert&lt;/a&gt;&lt;/li&gt;&lt;br /&gt; &lt;li&gt;&lt;a href="http://www.jwc3.net/2009/01/subsonic-versus-linktosql-simple-update.html"&gt;SubSonic versus LinqToSQL: Simple Update&lt;/a&gt;&lt;/li&gt;&lt;br /&gt; &lt;li&gt;&lt;a href="http://www.jwc3.net/2009/01/subsonic-versus-linktosql-simple-delete.html"&gt;SubSonic versus LinqToSQL: Simple Delete&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Here is the simple delete using SubSonic:&lt;/strong&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; SubSonic;&lt;br /&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; MyCustomDAL;&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; DeleteProduct(&lt;span class="kwrd"&gt;int&lt;/span&gt; ProductID)&lt;br /&gt;{&lt;br /&gt;  Product p = &lt;span class="kwrd"&gt;new&lt;/span&gt; Product(ProductID)&lt;br /&gt;  p.Destroy();&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;strong&gt;And here is the simple delete using LinqToSQL:&lt;/strong&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Linq;&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; DeleteProduct(&lt;span class="kwrd"&gt;int&lt;/span&gt; ProductID)&lt;br /&gt;    {&lt;br /&gt;        NorthwindDataContext db = &lt;span class="kwrd"&gt;new&lt;/span&gt; NorthwindDataContext();&lt;br /&gt;&lt;br /&gt;        Product p = (from products &lt;span class="kwrd"&gt;in&lt;/span&gt; db.Products&lt;br /&gt;                     &lt;span class="kwrd"&gt;where&lt;/span&gt; products.ProductID == ProductID&lt;br /&gt;                     select products).FirstOrDefault();&lt;br /&gt;        db.Products.DeleteOnSubmit(p);&lt;br /&gt;        db.SubmitChanges();&lt;br /&gt;&lt;br /&gt;    }&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/954701964661625078-113969789452510683?l=www.jwc3.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Lul-8kwo29NsT8hZRJOnEzZKRxY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Lul-8kwo29NsT8hZRJOnEzZKRxY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Lul-8kwo29NsT8hZRJOnEzZKRxY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Lul-8kwo29NsT8hZRJOnEzZKRxY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/JamesSandbox/~4/deN7ays9Ip4" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/JamesSandbox/~3/deN7ays9Ip4/subsonic-versus-linktosql-simple-delete.html</link><author>noreply@blogger.com (James Curtis)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.jwc3.net/2009/01/subsonic-versus-linktosql-simple-delete.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-954701964661625078.post-3710355954594766750</guid><pubDate>Fri, 16 Jan 2009 14:42:00 +0000</pubDate><atom:updated>2009-01-19T10:35:43.027-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">SubSonic</category><category domain="http://www.blogger.com/atom/ns#">LinqToSQL</category><title>SubSonic versus LinqToSQL: Simple Insert</title><description>Continuing the series, here I demonstrate a simple insert using SubSonic and then the equivalent using LinqToSQL.&lt;br /&gt;&lt;br /&gt;If you are looking for other posts in this series, here is the list:&lt;br /&gt; &lt;li&gt;&lt;a href="http://www.jwc3.net/2009/01/subsonic-versus-linktosql-simple-select.html"&gt;SubSonic versus LinqToSQL: Simple Select&lt;/a&gt;&lt;/li&gt;&lt;br /&gt; &lt;li&gt;&lt;a href="http://www.jwc3.net/2009/01/subsonic-versus-linktosql-simple-insert.html"&gt;SubSonic versus LinqToSQL: Simple Insert&lt;/a&gt;&lt;/li&gt;&lt;br /&gt; &lt;li&gt;&lt;a href="http://www.jwc3.net/2009/01/subsonic-versus-linktosql-simple-update.html"&gt;SubSonic versus LinqToSQL: Simple Update&lt;/a&gt;&lt;/li&gt;&lt;br /&gt; &lt;li&gt;&lt;a href="http://www.jwc3.net/2009/01/subsonic-versus-linktosql-simple-delete.html"&gt;SubSonic versus LinqToSQL: Simple Delete&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Here is a Simple Insert using SubSonic:&lt;/strong&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; SubSonic;&lt;br /&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; MyCustomDAL;&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; InsertProduct()&lt;br /&gt;{&lt;br /&gt;  Product p = &lt;span class="kwrd"&gt;new&lt;/span&gt; Product();&lt;br /&gt;&lt;br /&gt;  p.ProductName = txtProductName.Text;&lt;br /&gt;  p.UnitPrice = &lt;span class="kwrd"&gt;decimal&lt;/span&gt;.Parse(txtUnitPrice.Text);&lt;br /&gt;  p.UnitsInStock = &lt;span class="kwrd"&gt;short&lt;/span&gt;.Parse(txtUnitsInStock.Text);&lt;br /&gt;  p.UnitsOnOrder = &lt;span class="kwrd"&gt;short&lt;/span&gt;.Parse(txtUnitsOnOrder.Text);&lt;br /&gt;  p.QuantityPerUnit = txtQuantityPerUnit.Text;&lt;br /&gt;  p.ReorderLevel = &lt;span class="kwrd"&gt;short&lt;/span&gt;.Parse(txtReorderLevel.Text);&lt;br /&gt;  p.Discontinued = &lt;span class="kwrd"&gt;false&lt;/span&gt;; &lt;br /&gt;&lt;br /&gt;  p.Save();&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;strong&gt;And here is a Simple Insert using LinqToSQL:&lt;/strong&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Linq;&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; InsertProduct()&lt;br /&gt;    {&lt;br /&gt;        NorthwindDataContext db = &lt;span class="kwrd"&gt;new&lt;/span&gt; NorthwindDataContext();&lt;br /&gt;&lt;br /&gt;        Product p = &lt;span class="kwrd"&gt;new&lt;/span&gt; Product();&lt;br /&gt;        {&lt;br /&gt;            p.ProductName = txtProductName.Text;&lt;br /&gt;            p.UnitPrice = &lt;span class="kwrd"&gt;decimal&lt;/span&gt;.Parse(txtUnitPrice.Text);&lt;br /&gt;            p.UnitsInStock = &lt;span class="kwrd"&gt;short&lt;/span&gt;.Parse(txtUnitsInStock.Text);&lt;br /&gt;            p.UnitsOnOrder = &lt;span class="kwrd"&gt;short&lt;/span&gt;.Parse(txtUnitsOnOrder.Text);&lt;br /&gt;            p.QuantityPerUnit = txtQuantityPerUnit.Text;&lt;br /&gt;            p.ReorderLevel = &lt;span class="kwrd"&gt;short&lt;/span&gt;.Parse(txtReorderLevel.Text);&lt;br /&gt;            p.Discontinued = &lt;span class="kwrd"&gt;false&lt;/span&gt;;            &lt;br /&gt;        }&lt;br /&gt;        db.SubmitChanges();&lt;br /&gt;&lt;br /&gt;    }&lt;/pre&gt;It is worth to note that between instaniating the Northwind database ("db") in the LinqToSQL and the "db.SubmitChanges();", any inserting calls that you are doing are just submitted once to the database.  So, if any of them fail, they all fail.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/954701964661625078-3710355954594766750?l=www.jwc3.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/b8RrNUPUr13pNobGk5CPaiQk2L4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/b8RrNUPUr13pNobGk5CPaiQk2L4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/b8RrNUPUr13pNobGk5CPaiQk2L4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/b8RrNUPUr13pNobGk5CPaiQk2L4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/JamesSandbox/~4/3Z3op70DdNg" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/JamesSandbox/~3/3Z3op70DdNg/subsonic-versus-linktosql-simple-insert.html</link><author>noreply@blogger.com (James Curtis)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.jwc3.net/2009/01/subsonic-versus-linktosql-simple-insert.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-954701964661625078.post-2326859506868180119</guid><pubDate>Fri, 16 Jan 2009 13:55:00 +0000</pubDate><atom:updated>2009-01-19T10:37:59.746-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">SubSonic</category><category domain="http://www.blogger.com/atom/ns#">LinqToSQL</category><title>SubSonic versus LinqToSQL: Simple Update</title><description>Continuing with my series "SubSonic versus LinqToSQL", here I'm going to compare a simple update using the Northwind database.&lt;br /&gt;&lt;br /&gt;If you are looking for other posts in this series, here is the list:&lt;br /&gt; &lt;li&gt;&lt;a href="http://www.jwc3.net/2009/01/subsonic-versus-linktosql-simple-select.html"&gt;SubSonic versus LinqToSQL: Simple Select&lt;/a&gt;&lt;/li&gt;&lt;br /&gt; &lt;li&gt;&lt;a href="http://www.jwc3.net/2009/01/subsonic-versus-linktosql-simple-insert.html"&gt;SubSonic versus LinqToSQL: Simple Insert&lt;/a&gt;&lt;/li&gt;&lt;br /&gt; &lt;li&gt;&lt;a href="http://www.jwc3.net/2009/01/subsonic-versus-linktosql-simple-update.html"&gt;SubSonic versus LinqToSQL: Simple Update&lt;/a&gt;&lt;/li&gt;&lt;br /&gt; &lt;li&gt;&lt;a href="http://www.jwc3.net/2009/01/subsonic-versus-linktosql-simple-delete.html"&gt;SubSonic versus LinqToSQL: Simple Delete&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Here is a Simple Update while using SubSonic:&lt;/strong&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; SubSonic;&lt;br /&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; MyCustomDAL;&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; UpdateProduct(ProductID)&lt;br /&gt;{&lt;br /&gt;  Product p = &lt;span class="kwrd"&gt;new&lt;/span&gt; Product(int ProductID)&lt;br /&gt;  p.ProductName = txtProductName.Text;&lt;br /&gt;  p.UnitPrice = &lt;span class="kwrd"&gt;double&lt;/span&gt;.Parse(txtUnitPrice.Text);&lt;br /&gt;  p.Save();&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;strong&gt;And here is a Simple Update while using LinqToSQL:&lt;/strong&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Linq;&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; UpdateProduct(int ProductID)&lt;br /&gt;{&lt;br /&gt;  NorthwindDataContext db = &lt;span class="kwrd"&gt;new&lt;/span&gt; NorthwindDataContext();&lt;br /&gt;&lt;br /&gt;  Product p = (from products &lt;span class="kwrd"&gt;in&lt;/span&gt; db.Products &lt;br /&gt;               &lt;span class="kwrd"&gt;where&lt;/span&gt; products.ProductID == ProductID&lt;br /&gt;               select products).FirstOrDefault();&lt;br /&gt;  p.UnitPrice = 0;&lt;br /&gt;  p.Discontinued = &lt;span class="kwrd"&gt;true&lt;/span&gt;;&lt;br /&gt;  db.SubmitChanges();&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;As you can see there are some similarities as there are also differences.  I encourage everyone to look into what those differences are to better prepare your programming toolset for jobs that lie ahead. :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/954701964661625078-2326859506868180119?l=www.jwc3.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/r7gV1Ua8IFT8YhOYl6n7FqKoU5E/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/r7gV1Ua8IFT8YhOYl6n7FqKoU5E/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/r7gV1Ua8IFT8YhOYl6n7FqKoU5E/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/r7gV1Ua8IFT8YhOYl6n7FqKoU5E/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/JamesSandbox/~4/O6eEKw_SXQU" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/JamesSandbox/~3/O6eEKw_SXQU/subsonic-versus-linktosql-simple-update.html</link><author>noreply@blogger.com (James Curtis)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.jwc3.net/2009/01/subsonic-versus-linktosql-simple-update.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-954701964661625078.post-106720442468764392</guid><pubDate>Fri, 16 Jan 2009 13:34:00 +0000</pubDate><atom:updated>2009-01-19T10:38:46.154-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">SubSonic</category><category domain="http://www.blogger.com/atom/ns#">LinqToSQL</category><title>SubSonic versus LinqToSQL: Simple Select</title><description>I have used SubSonic for years, and quite frankly was avoiding LinqToSQL because I didn't think that I would want to use it.  After playing around with LinqToSQL a bit (forced by using ASP.NET Dynamic Data), it's not too bad.  I thought that I would give a few quick comparisons for those who are also using SubSonic and have not drawn a correlation yet on how to achieve similar results while using LinqToSQL.  Both are looking at the Northwind database, btw.&lt;br /&gt;&lt;br /&gt;If you are looking for other posts in this series, here is the list:&lt;br /&gt; &lt;li&gt;&lt;a href="http://www.jwc3.net/2009/01/subsonic-versus-linktosql-simple-select.html"&gt;SubSonic versus LinqToSQL: Simple Select&lt;/a&gt;&lt;/li&gt;&lt;br /&gt; &lt;li&gt;&lt;a href="http://www.jwc3.net/2009/01/subsonic-versus-linktosql-simple-insert.html"&gt;SubSonic versus LinqToSQL: Simple Insert&lt;/a&gt;&lt;/li&gt;&lt;br /&gt; &lt;li&gt;&lt;a href="http://www.jwc3.net/2009/01/subsonic-versus-linktosql-simple-update.html"&gt;SubSonic versus LinqToSQL: Simple Update&lt;/a&gt;&lt;/li&gt;&lt;br /&gt; &lt;li&gt;&lt;a href="http://www.jwc3.net/2009/01/subsonic-versus-linktosql-simple-delete.html"&gt;SubSonic versus LinqToSQL: Simple Delete&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Here is a Simple Select command using SubSonic:&lt;/strong&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; SubSonic;&lt;br /&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; MyCustomDAL;&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; GetProduct(ProductID)&lt;br /&gt;{&lt;br /&gt;  Product p = &lt;span class="kwrd"&gt;new&lt;/span&gt; Product(int ProductID)&lt;br /&gt;  txtProductName = p.ProductName;&lt;br /&gt;  txtUnitPrice = p.UnitPrice;&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;strong&gt;And here is the LinqToSQL equivalent:&lt;/strong&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Linq;&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; GetProduct(int ProductID)&lt;br /&gt;{&lt;br /&gt;  NorthwindDataContext db = &lt;span class="kwrd"&gt;new&lt;/span&gt; NorthwindDataContext();&lt;br /&gt;&lt;br /&gt;  var products = from p &lt;span class="kwrd"&gt;in&lt;/span&gt; db.Products&lt;br /&gt;                 &lt;span class="kwrd"&gt;where&lt;/span&gt; p.ID == ProductID&lt;br /&gt;                 select p;&lt;br /&gt;&lt;br /&gt;  &lt;span class="kwrd"&gt;foreach&lt;/span&gt; (var product &lt;span class="kwrd"&gt;in&lt;/span&gt; products)&lt;br /&gt;  {&lt;br /&gt;    txtProductName = product.ProductName;&lt;br /&gt;    txtUnitPrice = product.UnitPrice;&lt;br /&gt;  }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;As you can see, there are similarities between the two.  I hope that this will encourage hardcore SubSonic users who have blown off LinqToSQL like I did to at least investigate LinqToSQL since I think it is not going away.  I will still be using SubSonic where I can, but if I have a requirement of "All Microsoft" then I will be using LinqToSQL.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/954701964661625078-106720442468764392?l=www.jwc3.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Ppd3h9Wco148U5WkGnPM3w02ec4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Ppd3h9Wco148U5WkGnPM3w02ec4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Ppd3h9Wco148U5WkGnPM3w02ec4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Ppd3h9Wco148U5WkGnPM3w02ec4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/JamesSandbox/~4/37vM6DuyFug" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/JamesSandbox/~3/37vM6DuyFug/subsonic-versus-linktosql-simple-select.html</link><author>noreply@blogger.com (James Curtis)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.jwc3.net/2009/01/subsonic-versus-linktosql-simple-select.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-954701964661625078.post-4332387457594044089</guid><pubDate>Thu, 15 Jan 2009 17:29:00 +0000</pubDate><atom:updated>2009-01-15T12:32:48.321-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">other stuff</category><title>New Year, New Choices</title><description>After much deliberation, I have decided to remove Haloscan as the default comment management for this blog.  While it had many high points, the fact of when I would get a new notification that a comment has been posted, Haloscan does not provide a link to which Blog post was commented.&lt;br /&gt;&lt;br /&gt;As you can imagine, when trying to keep a dialog or help someone, it makes it difficult to do without this very simple piece of code missing.  So, I apologize to all of the people's comments that were posted before today (Jan 14th, 2009), but I need to be able to respond to you guys. :)&lt;br /&gt;&lt;br /&gt;Happy 2009, BTW! :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/954701964661625078-4332387457594044089?l=www.jwc3.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/uJNPUByd3PA28FcR-Q4VOq7h6yw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/uJNPUByd3PA28FcR-Q4VOq7h6yw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/uJNPUByd3PA28FcR-Q4VOq7h6yw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/uJNPUByd3PA28FcR-Q4VOq7h6yw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/JamesSandbox/~4/5wIYb3lD7i0" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/JamesSandbox/~3/5wIYb3lD7i0/new-year-new-choices.html</link><author>noreply@blogger.com (James Curtis)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><feedburner:origLink>http://www.jwc3.net/2009/01/new-year-new-choices.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-954701964661625078.post-3476077215696688604</guid><pubDate>Mon, 15 Dec 2008 20:03:00 +0000</pubDate><atom:updated>2008-12-15T15:11:25.660-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Master Pages</category><category domain="http://www.blogger.com/atom/ns#">AJAX</category><category domain="http://www.blogger.com/atom/ns#">ASP.NET</category><title>Master Page Error (AJAX 1.0 / .NET 3.5)</title><description>If you have a .NET 2.0 site that is using AJAX 1.0 and you change the project to .NET 3.5, your web.config file gets modified.  Then, when you try to look at any page that references the master page file, you will get this error:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;em&gt;&lt;strong&gt;Master Page error&lt;br /&gt;The Master Page file '~/MasterPage.master' cannot be loaded.&lt;br /&gt;Correct the problem in Code View&lt;/strong&gt;&lt;/em&gt;&lt;/blockquote&gt;&lt;br /&gt;Basically, it rewrites the &lt;sectiongroup&gt; "sections" with the updated assemblies for AJAX in .NET 3.5.  To fix this immediately, return your site to a .NET 2.0 site, and update your web.config file using this (just look for and replace the "sectionGroup" sections):&lt;br /&gt;&lt;pre class="code"&gt;&lt;br /&gt;&amp;lt;sectionGroup name=&lt;span class="str"&gt;"system.web.extensions"&lt;/span&gt; type=&lt;span class="str"&gt;"System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"&lt;/span&gt;&amp;gt;&lt;br /&gt;            &amp;lt;sectionGroup name=&lt;span class="str"&gt;"scripting"&lt;/span&gt; type=&lt;span class="str"&gt;"System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"&lt;/span&gt;&amp;gt;&lt;br /&gt;                &amp;lt;section name=&lt;span class="str"&gt;"scriptResourceHandler"&lt;/span&gt; type=&lt;span class="str"&gt;"System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"&lt;/span&gt; requirePermission=&lt;span class="str"&gt;"false"&lt;/span&gt; allowDefinition=&lt;span class="str"&gt;"MachineToApplication"&lt;/span&gt;/&amp;gt;&lt;br /&gt;                &amp;lt;sectionGroup name=&lt;span class="str"&gt;"webServices"&lt;/span&gt; type=&lt;span class="str"&gt;"System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"&lt;/span&gt;&amp;gt;&lt;br /&gt;                    &amp;lt;section name=&lt;span class="str"&gt;"jsonSerialization"&lt;/span&gt; type=&lt;span class="str"&gt;"System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"&lt;/span&gt; requirePermission=&lt;span class="str"&gt;"false"&lt;/span&gt; allowDefinition=&lt;span class="str"&gt;"Everywhere"&lt;/span&gt; /&amp;gt;&lt;br /&gt;                    &amp;lt;section name=&lt;span class="str"&gt;"profileService"&lt;/span&gt; type=&lt;span class="str"&gt;"System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"&lt;/span&gt; requirePermission=&lt;span class="str"&gt;"false"&lt;/span&gt; allowDefinition=&lt;span class="str"&gt;"MachineToApplication"&lt;/span&gt; /&amp;gt;&lt;br /&gt;                    &amp;lt;section name=&lt;span class="str"&gt;"authenticationService"&lt;/span&gt; type=&lt;span class="str"&gt;"System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"&lt;/span&gt; requirePermission=&lt;span class="str"&gt;"false"&lt;/span&gt; allowDefinition=&lt;span class="str"&gt;"MachineToApplication"&lt;/span&gt; /&amp;gt;&lt;br /&gt;                &amp;lt;/sectionGroup&amp;gt;&lt;br /&gt;            &amp;lt;/sectionGroup&amp;gt;&lt;br /&gt;        &amp;lt;/sectionGroup&amp;gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/954701964661625078-3476077215696688604?l=www.jwc3.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/IWN8qyxfY8b4h5ibf1BgbL6gofo/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/IWN8qyxfY8b4h5ibf1BgbL6gofo/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/IWN8qyxfY8b4h5ibf1BgbL6gofo/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/IWN8qyxfY8b4h5ibf1BgbL6gofo/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/JamesSandbox/~4/QWGsx3C4Wq8" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/JamesSandbox/~3/QWGsx3C4Wq8/master-page-error-ajax-10-net-35.html</link><author>noreply@blogger.com (James Curtis)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><feedburner:origLink>http://www.jwc3.net/2008/12/master-page-error-ajax-10-net-35.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-954701964661625078.post-2082391943512562958</guid><pubDate>Mon, 08 Dec 2008 14:54:00 +0000</pubDate><atom:updated>2008-12-08T10:02:35.698-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Sql Server</category><title>SQL Server - Cannot attach a database that was being restored</title><description>This was a fun error. We had an extremely large database (450 GB) that was in the process of restoring and got hung up in SQL Server 2005. Each time we would try to attach the database, it would fail because it kept thinking it was "being restored". So, after you take some aspirin, be assurred that there is a way to "trick" SQL Server.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;strong&gt;Create a new database&lt;/strong&gt; with the same name as the one you are trying to attach.&lt;/li&gt;&lt;li&gt;(optional) &lt;strong&gt;Detach the database&lt;/strong&gt;, and then move the MDF and LDF files to the specific drives that you need.&lt;/li&gt;&lt;li&gt;(optional) &lt;strong&gt;Reattach the database&lt;/strong&gt; from it's new location.  You will have to update the paths to the LDF file when restoring.&lt;/li&gt;&lt;li&gt;Take the database &lt;strong&gt;Offline&lt;/strong&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Copy your original MDF and LDF files&lt;/strong&gt; and overwrite the newly created files.&lt;/li&gt;&lt;li&gt;Bring the database back &lt;strong&gt;Online&lt;/strong&gt;.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Wah-la!  It's back! &lt;br /&gt;&lt;br /&gt;If this didn't work for you, you may have something more severe on your hands like a corrupt database file.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/954701964661625078-2082391943512562958?l=www.jwc3.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/RxvZsMsLhLGObFj1xGH8k0452SY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/RxvZsMsLhLGObFj1xGH8k0452SY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/RxvZsMsLhLGObFj1xGH8k0452SY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/RxvZsMsLhLGObFj1xGH8k0452SY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/JamesSandbox/~4/D7n1A1dpnNw" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/JamesSandbox/~3/D7n1A1dpnNw/sql-server-cannot-attach-database-that.html</link><author>noreply@blogger.com (James Curtis)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.jwc3.net/2008/12/sql-server-cannot-attach-database-that.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-954701964661625078.post-1230964304770615830</guid><pubDate>Fri, 14 Nov 2008 13:53:00 +0000</pubDate><atom:updated>2009-01-16T09:15:09.068-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">SharePoint</category><category domain="http://www.blogger.com/atom/ns#">CodePlex</category><title>CodePlex: Google Maps Web Part (WSS/MOSS)</title><description>&lt;em&gt;Note: If you have never been on &lt;/em&gt;&lt;a href="http://www.codeplex.com/"&gt;&lt;em&gt;CodePlex.com&lt;/em&gt;&lt;/a&gt;&lt;em&gt;, you might want to check it out if you are developing anything Microsoft related.&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;I ran across a new project that is running against the Google Maps API and allows simple moderation in a Web Toolbar to use Google Maps within SharePoint. I'll list the features from the project, but if you don't want to read it and want the project, then here's the link: &lt;a href="http://www.codeplex.com/googlemapswebpart"&gt;http://www.codeplex.com/googlemapswebpart&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;[Copied from CodePlex]&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Project Description&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Using this web part you can display points and locations on a Google map and get directions to an from that point. You can either manually enter an individual point or select a list from your Sharepoint site that holds the information that is required - ie. a field for the Buidling Name, its Longitude and its Lattitude.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Features&lt;/strong&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Pick your zoom level - comes with handy real world scales &lt;/li&gt;&lt;li&gt;Choose any map type &lt;/li&gt;&lt;li&gt;Enter your own Google Maps API Key &lt;/li&gt;&lt;li&gt;Create a List using an inbuilt feature that is already set up for optimal performance with the web part &lt;/li&gt;&lt;li&gt;Or Pick a list from your MOSS site using the Site Picker pop up window (That thing you see when you're using the Content Query Web Part) &lt;/li&gt;&lt;li&gt;Match fields from your list that have the Longitude Lattitude &lt;/li&gt;&lt;li&gt;Name of Site &lt;/li&gt;&lt;li&gt;URL of an image &lt;/li&gt;&lt;li&gt;Or select a default image using the Asset Selector pop up window (That thing you see when creating hyperlinks in your text or inserting pictures) &lt;/li&gt;&lt;li&gt;Centre the map on any of your sites &lt;/li&gt;&lt;li&gt;Get directions &lt;/li&gt;&lt;li&gt;From one of your sites to another site &lt;/li&gt;&lt;li&gt;From one of your sites to an address &lt;/li&gt;&lt;li&gt;From an address to one of your sites &lt;/li&gt;&lt;li&gt;And you don't have to use a list! You can enter information for a single point Longitude Lattitude &lt;/li&gt;&lt;li&gt;Name of Site &lt;/li&gt;&lt;li&gt;URL of an image&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;[/Copied from CodePlex]&lt;br /&gt;&lt;br /&gt;Enjoy!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/954701964661625078-1230964304770615830?l=www.jwc3.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/jtDMRmTucawhT9RiBs9y_4pvckQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/jtDMRmTucawhT9RiBs9y_4pvckQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/jtDMRmTucawhT9RiBs9y_4pvckQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/jtDMRmTucawhT9RiBs9y_4pvckQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/JamesSandbox/~4/7dL95hkA8JA" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/JamesSandbox/~3/7dL95hkA8JA/codeplex-google-maps-web-part-wssmoss.html</link><author>noreply@blogger.com (James Curtis)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.jwc3.net/2008/11/codeplex-google-maps-web-part-wssmoss.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-954701964661625078.post-5555468250248151027</guid><pubDate>Wed, 12 Nov 2008 22:27:00 +0000</pubDate><atom:updated>2008-11-12T17:37:23.484-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Sql Server</category><category domain="http://www.blogger.com/atom/ns#">Windows</category><category domain="http://www.blogger.com/atom/ns#">Tips and Tricks</category><category domain="http://www.blogger.com/atom/ns#">VS TFS</category><category domain="http://www.blogger.com/atom/ns#">MOSS 2007</category><title>TFS 2008 on Windows Server 2008 with MOSS 2007 and SQL 2008</title><description>Ok kids. This was a big headache for me, but I got it all worked out so that I can help you out. Basically what we had here was Windows Server 2008 with SQL 2008, MOSS 2007 SP1, and TFS 2008 SP1. I had another server running Active Directory (AD) that was also Windows Server 2008.&lt;br /&gt;&lt;br /&gt;TFS 2008 would not allow me to install it using my MOSS 2007 server with my web application "http://quarry.limestone.local". So, I tried another one "http://stone/". Still no luck. Apparently, it doesn't like anything other than the server name. Here's the 2nd gotcha: you have to use another port than 80.&lt;br /&gt;&lt;br /&gt;So, here's a screenshot of what did work:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_BVcJoi56t9c/SRtZUvNkmRI/AAAAAAAAAMM/xEZLjmrmjME/s1600-h/vs2008ts_WSS.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5267902401945573650" style="WIDTH: 400px; CURSOR: hand; HEIGHT: 356px" alt="" src="http://4.bp.blogspot.com/_BVcJoi56t9c/SRtZUvNkmRI/AAAAAAAAAMM/xEZLjmrmjME/s400/vs2008ts_WSS.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I hope that helps you guys out and saves you the headache (if you found this post or one of my other posts on this topic on other sites).&lt;br /&gt;&lt;br /&gt;Cheers.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/954701964661625078-5555468250248151027?l=www.jwc3.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/w5xuSa6mK5vtXNat9iQQlOOLPc4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/w5xuSa6mK5vtXNat9iQQlOOLPc4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/w5xuSa6mK5vtXNat9iQQlOOLPc4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/w5xuSa6mK5vtXNat9iQQlOOLPc4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/JamesSandbox/~4/2HwfMDNH98c" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/JamesSandbox/~3/2HwfMDNH98c/tfs-2008-on-windows-server-2008-with.html</link><author>noreply@blogger.com (James Curtis)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_BVcJoi56t9c/SRtZUvNkmRI/AAAAAAAAAMM/xEZLjmrmjME/s72-c/vs2008ts_WSS.jpg" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.jwc3.net/2008/11/tfs-2008-on-windows-server-2008-with.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-954701964661625078.post-386876738552739219</guid><pubDate>Wed, 29 Oct 2008 18:12:00 +0000</pubDate><atom:updated>2008-10-30T12:57:09.205-04:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Sql Server</category><category domain="http://www.blogger.com/atom/ns#">Tips and Tricks</category><title>Getting Stats from SQL Server via Query</title><description>For a long time now, I use references to the sysobjects table to get some stats on databases that are being catalogued for a database migration (or for just cataloguing in general). Anyways, I open up Query Analyzer (SQL 2000) or a new Query window (SQL 2005/2008) and use variations of the following code examples:&lt;br /&gt;&lt;pre class="code"&gt;&lt;span class="rem"&gt;-- Counts all the tables in a database&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;SELECT&lt;/span&gt; [&lt;span class="kwrd"&gt;Count&lt;/span&gt;] = &lt;span class="kwrd"&gt;count&lt;/span&gt;(so.name)&lt;br /&gt;&lt;span class="kwrd"&gt;FROM&lt;/span&gt; sysobjects so&lt;br /&gt;&lt;span class="kwrd"&gt;WHERE&lt;/span&gt; so.xtype = &lt;span class="str"&gt;'U'&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span class="rem"&gt;-- Counts all stored procedures in a database&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;SELECT&lt;/span&gt; [&lt;span class="kwrd"&gt;Count&lt;/span&gt;] = &lt;span class="kwrd"&gt;count&lt;/span&gt;(so.name)&lt;br /&gt;&lt;span class="kwrd"&gt;FROM&lt;/span&gt; sysobjects so&lt;br /&gt;&lt;span class="kwrd"&gt;WHERE&lt;/span&gt; so.xtype = &lt;span class="str"&gt;'P'&lt;/span&gt; &lt;/pre&gt;&lt;pre class="code"&gt;&lt;span class="rem"&gt;-- Returns the count of main database objects&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;SELECT&lt;/span&gt; [Tables] = &lt;span class="kwrd"&gt;count&lt;/span&gt;(so.name)&lt;span class="kwrd"&gt;FROM&lt;/span&gt; sysobjects so &lt;span class="kwrd"&gt;WHERE&lt;/span&gt; so.xtype = &lt;span class="str"&gt;'U'&lt;/span&gt; &lt;span class="kwrd"&gt;AND&lt;/span&gt; &lt;span class="kwrd"&gt;left&lt;/span&gt;(so.type,2) &amp;lt;&amp;gt; &lt;span class="str"&gt;'dt'&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;SELECT&lt;/span&gt; [StoredProcs] = &lt;span class="kwrd"&gt;count&lt;/span&gt;(so.name)&lt;span class="kwrd"&gt;FROM&lt;/span&gt; sysobjects so &lt;span class="kwrd"&gt;WHERE&lt;/span&gt; so.xtype = &lt;span class="str"&gt;'P'&lt;/span&gt; &lt;span class="kwrd"&gt;AND&lt;/span&gt; &lt;span class="kwrd"&gt;left&lt;/span&gt;(so.type,2) &amp;lt;&amp;gt; &lt;span class="str"&gt;'dt'&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;SELECT&lt;/span&gt; [Views] = &lt;span class="kwrd"&gt;count&lt;/span&gt;(so.name)&lt;span class="kwrd"&gt;FROM&lt;/span&gt; sysobjects so &lt;span class="kwrd"&gt;WHERE&lt;/span&gt; so.xtype = &lt;span class="str"&gt;'V'&lt;/span&gt; &lt;span class="kwrd"&gt;AND&lt;/span&gt; &lt;span class="kwrd"&gt;left&lt;/span&gt;(so.type,2) &amp;lt;&amp;gt; &lt;span class="str"&gt;'dt'&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;SELECT&lt;/span&gt; [Triggers] = &lt;span class="kwrd"&gt;count&lt;/span&gt;(so.name)&lt;span class="kwrd"&gt;FROM&lt;/span&gt; sysobjects so &lt;span class="kwrd"&gt;WHERE&lt;/span&gt; so.xtype = &lt;span class="str"&gt;'TR'&lt;/span&gt; &lt;span class="kwrd"&gt;AND&lt;/span&gt; &lt;span class="kwrd"&gt;left&lt;/span&gt;(so.type,2) &amp;lt;&amp;gt; &lt;span class="str"&gt;'dt'&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;SELECT&lt;/span&gt; [ExtendedStoredProcs] = &lt;span class="kwrd"&gt;count&lt;/span&gt;(so.name)&lt;span class="kwrd"&gt;FROM&lt;/span&gt; sysobjects so &lt;span class="kwrd"&gt;WHERE&lt;/span&gt; so.xtype = &lt;span class="str"&gt;'X'&lt;/span&gt; &lt;span class="kwrd"&gt;AND&lt;/span&gt; &lt;span class="kwrd"&gt;left&lt;/span&gt;(so.type,2) &amp;lt;&amp;gt; &lt;span class="str"&gt;'dt'&lt;/span&gt;&lt;/pre&gt;This is the list of all possible values for this column (xtype):&lt;br /&gt;&lt;ul&gt;&lt;li&gt;C = CHECK constraint &lt;/li&gt;&lt;li&gt;D = Default or DEFAULT constraint &lt;/li&gt;&lt;li&gt;F = FOREIGN KEY constraint &lt;/li&gt;&lt;li&gt;L = Log &lt;/li&gt;&lt;li&gt;P = Stored procedure &lt;/li&gt;&lt;li&gt;PK = PRIMARY KEY constraint (type is K) &lt;/li&gt;&lt;li&gt;RF = Replication filter stored procedure &lt;/li&gt;&lt;li&gt;S = System table &lt;/li&gt;&lt;li&gt;TR = Trigger &lt;/li&gt;&lt;li&gt;U = User table &lt;/li&gt;&lt;li&gt;UQ = UNIQUE constraint (type is K) &lt;/li&gt;&lt;li&gt;V = View &lt;/li&gt;&lt;li&gt;X = Extended stored procedure&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/954701964661625078-386876738552739219?l=www.jwc3.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/InYSqGlE0N96f9TfVQZj91tvnx4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/InYSqGlE0N96f9TfVQZj91tvnx4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/InYSqGlE0N96f9TfVQZj91tvnx4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/InYSqGlE0N96f9TfVQZj91tvnx4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/JamesSandbox/~4/WC07gkc6P2A" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/JamesSandbox/~3/WC07gkc6P2A/getting-stats-from-sql-server-via-query.html</link><author>noreply@blogger.com (James Curtis)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.jwc3.net/2008/10/getting-stats-from-sql-server-via-query.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-954701964661625078.post-6836747999171539606</guid><pubDate>Thu, 23 Oct 2008 19:18:00 +0000</pubDate><atom:updated>2008-10-23T21:25:34.695-04:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">SharePoint</category><category domain="http://www.blogger.com/atom/ns#">Tips and Tricks</category><category domain="http://www.blogger.com/atom/ns#">MOSS 2007</category><title>MOSS 2007 - Anatomy of the Request Access Page</title><description>I have come across a scenario where I was thinking on adding to the "Access Denied" sets of pages, specifically the "Request Access" page. I had abandoned the idea for the project, but I thought that I would post the "If I did it scenario" (sad O.J. Simpson book reference attempt). :)&lt;br /&gt;&lt;br /&gt;First off, if you have never seen this page in SharePoint, you will someday (below).&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_BVcJoi56t9c/SQDQzTUNrJI/AAAAAAAAAK0/L_kMcL2pEEI/s1600-h/accessDenied.gif"&gt;&lt;img id="BLOGGER_PHOTO_ID_5260433944545701010" style="WIDTH: 400px; CURSOR: hand; HEIGHT: 242px" alt="" src="http://1.bp.blogspot.com/_BVcJoi56t9c/SQDQzTUNrJI/AAAAAAAAAK0/L_kMcL2pEEI/s400/accessDenied.gif" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Anyways, I wanted to modify the page that shows up after this page if you click "Request access". The page that pulls up will have a textarea that you can fill in and then submit. This request goes to the site owner of the SharePoint site. Below, I had found the page that you can modify to change the form around to whatever you want. The only drawback here is that if you change it, it will affect all the Sharepoint sites in the server farm because they all reference this page.&lt;br /&gt;&lt;br /&gt;Page Location: C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\reqacc.aspx&lt;br /&gt;&lt;br /&gt;I decided to add two extra form fields to it, FullName and Department.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_BVcJoi56t9c/SQEiBzpmC9I/AAAAAAAAALc/gDg88gOi930/s1600-h/requestaccess.gif"&gt;&lt;img id="BLOGGER_PHOTO_ID_5260523254185331666" style="WIDTH: 400px; CURSOR: hand; HEIGHT: 350px" alt="" src="http://1.bp.blogspot.com/_BVcJoi56t9c/SQEiBzpmC9I/AAAAAAAAALc/gDg88gOi930/s400/requestaccess.gif" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This page also uses a resource file which is independent per web application. You can simply open up the “resx” resource file and edit the tag you want. You do not need to restart IIS after making a change to the resource file – just refresh the page.&lt;br /&gt;&lt;br /&gt;Resource Location: C:\Inetpub\wwwroot\wss\VirtualDirectories\&lt;yourwebapp&gt;\App_GlobalResources&lt;br /&gt;&lt;br /&gt;File Name: wss.en-US.resx (differs by language used)&lt;br /&gt;&lt;br /&gt;Tags to Change (if you desire):&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;data name="accessDenied_pagetitle"&gt;&lt;value&gt;Error: Access Denied&lt;/value&gt; &lt;/li&gt;&lt;li&gt;&lt;value&gt;Current User&lt;/value&gt; &lt;/li&gt;&lt;li&gt;&lt;value&gt;You are currently signed in as:&lt;/value&gt; &lt;/li&gt;&lt;li&gt;&lt;value&gt;Sign in as a different user&lt;/value&gt; &lt;/li&gt;&lt;li&gt;&lt;value&gt;Request access&lt;/value&gt; &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;I know that you’re probably like “James, that’s great, but how the heck do I control the email generation from the page?” Well, that’s another issue, but can be fixed. At the top of the reqacc.aspx page, there is the following:&lt;br /&gt;&lt;%@ Assembly Name="Microsoft.SharePoint.ApplicationPages, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%&gt;&lt;%@ Page Language="C#" Inherits="Microsoft.SharePoint.ApplicationPages.RequestAccess" MasterPageFile="~/_layouts/simple.master"      %&gt;&lt;%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %&gt;&lt;br /&gt;So, if you want to see the default code that is used to make the “magic” happen for email generation, fire open Reflector (&lt;a href="http://www.red-gate.com/products/reflector/"&gt;download Reflector&lt;/a&gt;) on the SharePoint server and open up the Microsoft.SharePoint.ApplicationPages.dll.&lt;br /&gt;&lt;br /&gt;Location: C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\CONFIG\BIN\Microsoft.SharePoint.ApplicationPages.dll&lt;br /&gt;&lt;br /&gt;Expand all the classes until you find RequestAccess. Then, Right-Click on RequestAccess and click Disassemble. Presto! There is the email generation code and how it’s getting the information to build the URL.&lt;br /&gt;&lt;br /&gt;So, you now have access to the front end and the back end of this small part of SharePoint. You just have to create your own customized code behind (and perhaps a copy of the form for the front end so you don’t modify the OOTB page).&lt;br /&gt;&lt;br /&gt;Enjoy!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/954701964661625078-6836747999171539606?l=www.jwc3.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ycCPBxFk6Bd20OHmGBvEJlG_Dvw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ycCPBxFk6Bd20OHmGBvEJlG_Dvw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/ycCPBxFk6Bd20OHmGBvEJlG_Dvw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ycCPBxFk6Bd20OHmGBvEJlG_Dvw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/JamesSandbox/~4/vfcOKr-shhE" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/JamesSandbox/~3/vfcOKr-shhE/moss-2007-anatomy-of-request-access.html</link><author>noreply@blogger.com (James Curtis)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_BVcJoi56t9c/SQDQzTUNrJI/AAAAAAAAAK0/L_kMcL2pEEI/s72-c/accessDenied.gif" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.jwc3.net/2008/10/moss-2007-anatomy-of-request-access.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-954701964661625078.post-1109988938634150503</guid><pubDate>Wed, 22 Oct 2008 21:11:00 +0000</pubDate><atom:updated>2008-10-22T17:13:03.494-04:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Tips and Tricks</category><title>Junction - Shortcuts for CMD and PowerShell File Paths</title><description>Some of you may know of the Junction.exe program for Windows, but some of you may not.  This is a little function that has been around for a little while now, and it's really useful if you are tired of trying to remember the full path you need to type in when trying to get to stsadm.exe (or similar) and don't have a shortcut.&lt;br /&gt;&lt;br /&gt;Well, now you can "alias" the long path via junction.exe. &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Turn this:&lt;/strong&gt; C:\windows\system32\drivers\etc&lt;br /&gt;&lt;strong&gt;Into this:&lt;/strong&gt;  C:\hosts&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Code:&lt;/strong&gt; junction.exe hosts C:\windows\system32\drivers\etc&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Another Example:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Turn this:&lt;/strong&gt;  C:\Program Files\Common Files\microsoft shared\Web Server Extensions\12&lt;br /&gt;&lt;strong&gt;Into this:&lt;/strong&gt;   C:\12hive&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Code:&lt;/strong&gt; junction.exe 12hive "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\12"&lt;br /&gt;&lt;br /&gt;&lt;a href="http://technet.microsoft.com/en-us/sysinternals/bb896768.aspx"&gt;TechNet Article and Download Link for Junction&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Enjoy!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/954701964661625078-1109988938634150503?l=www.jwc3.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/nDd0GQvASFhSnQ2odacGne9-uCg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/nDd0GQvASFhSnQ2odacGne9-uCg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/nDd0GQvASFhSnQ2odacGne9-uCg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/nDd0GQvASFhSnQ2odacGne9-uCg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/JamesSandbox/~4/I_Qa6jZbnZE" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/JamesSandbox/~3/I_Qa6jZbnZE/junction-shortcuts-for-cmd-and.html</link><author>noreply@blogger.com (James Curtis)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.jwc3.net/2008/10/junction-shortcuts-for-cmd-and.html</feedburner:origLink></item></channel></rss>
