<?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>Sun, 08 Nov 2009 08:42:16 +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>82</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/JamesSandbox" type="application/rss+xml" /><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-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'/&gt;&lt;/div&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">0</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'/&gt;&lt;/div&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'/&gt;&lt;/div&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'/&gt;&lt;/div&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'/&gt;&lt;/div&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'/&gt;&lt;/div&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'/&gt;&lt;/div&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'/&gt;&lt;/div&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'/&gt;&lt;/div&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'/&gt;&lt;/div&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'/&gt;&lt;/div&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'/&gt;&lt;/div&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'/&gt;&lt;/div&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'/&gt;&lt;/div&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'/&gt;&lt;/div&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'/&gt;&lt;/div&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'/&gt;&lt;/div&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'/&gt;&lt;/div&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'/&gt;&lt;/div&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'/&gt;&lt;/div&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><item><guid isPermaLink="false">tag:blogger.com,1999:blog-954701964661625078.post-2113205556839403494</guid><pubDate>Wed, 22 Oct 2008 20:29:00 +0000</pubDate><atom:updated>2008-10-22T17:08:26.352-04:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">PowerShell</category><title>PowerShell Download for XP / 2003 / Vista (RTM) plus Extensions</title><description>If you are not using Vista (non-RTM) or Windows Server 2008, and you require PowerShell to run scripts, etc., then you will have to download PowerShell. You can do a Google search as usual and find all the parts you need, or just bookmark this post. :)&lt;br /&gt;&lt;br /&gt;Microsoft PowerShell (ver. 1):&lt;br /&gt;&lt;a href="http://www.microsoft.com/windowsserver2003/technologies/management/powershell/download.mspx"&gt;http://www.microsoft.com/windowsserver2003/technologies/management/powershell/download.mspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Microsoft PowerShell (ver. 2 CTP):&lt;br /&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=7C8051C2-9BFC-4C81-859D-0864979FA403&amp;amp;displaylang=en"&gt;http://www.microsoft.com/downloads/details.aspx?FamilyId=7C8051C2-9BFC-4C81-859D-0864979FA403&amp;amp;displaylang=en&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;PowerShell Extensions (CodePlex):&lt;br /&gt;&lt;a href="http://www.codeplex.com/PowerShellCX"&gt;http://www.codeplex.com/PowerShellCX&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Microsoft PowerShell SDK:&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/aa830112.aspx"&gt;http://msdn.microsoft.com/en-us/library/aa830112.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Microsoft PowerShell Documentation:&lt;br /&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=B4720B00-9A66-430F-BD56-EC48BFCA154F&amp;amp;displaylang=en"&gt;http://www.microsoft.com/downloads/details.aspx?FamilyId=B4720B00-9A66-430F-BD56-EC48BFCA154F&amp;amp;displaylang=en&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Microsoft PowerShell Team Blog:&lt;br /&gt;&lt;a href="http://blogs.msdn.com/powershell/"&gt;http://blogs.msdn.com/powershell/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Microsoft Scripting with Windows PowerShell Site:&lt;br /&gt;&lt;a href="http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx"&gt;http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/954701964661625078-2113205556839403494?l=www.jwc3.net'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JamesSandbox/~4/lKZwEopAYP4" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/JamesSandbox/~3/lKZwEopAYP4/powershell-download-for-xp-2003-vista.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/powershell-download-for-xp-2003-vista.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-954701964661625078.post-6163302890778950142</guid><pubDate>Tue, 21 Oct 2008 13:21:00 +0000</pubDate><atom:updated>2008-10-21T09:47:00.578-04:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">SharePoint</category><category domain="http://www.blogger.com/atom/ns#">Walkthroughs</category><category domain="http://www.blogger.com/atom/ns#">MOSS 2007</category><title>MOSS 2007 - Simple Workflow Walkthrough</title><description>I decided to put together a simple Workflow in MOSS 2007 to help other get a quick introduction to them. Workflows are not some mythical creature in SharePoint, although sometimes they can seem a bit tricky. :) Below I have screenshots for the step by step of creating a simple workflow on a document library.&lt;br /&gt;&lt;br /&gt;Here is what we want this workflow for:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Notify for new document&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Collect feedback from a "Reviewer" on the new document&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;1) Go to your Document Library, and go to Settings &gt; Document Library Settings&lt;/p&gt;&lt;a href="http://4.bp.blogspot.com/_BVcJoi56t9c/SP3YVJm0LNI/AAAAAAAAAJE/1G8DUczVniM/s1600-h/spworkflow001.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5259597797706181842" style="CURSOR: hand" alt="" src="http://4.bp.blogspot.com/_BVcJoi56t9c/SP3YVJm0LNI/AAAAAAAAAJE/1G8DUczVniM/s400/spworkflow001.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;2) In the Settings page, choose Workflow Settings.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_BVcJoi56t9c/SP3YVgO29FI/AAAAAAAAAJM/5s6oGXx-4ys/s1600-h/spworkflow002.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5259597803779716178" style="CURSOR: hand" alt="" src="http://4.bp.blogspot.com/_BVcJoi56t9c/SP3YVgO29FI/AAAAAAAAAJM/5s6oGXx-4ys/s400/spworkflow002.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;3) Click "Create a new Workflow"&lt;br /&gt;&lt;br /&gt;4) For this walkthrough, I'm collecting feedback for all new documents.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_BVcJoi56t9c/SP3YV0QeqCI/AAAAAAAAAJU/ZkVkyV_zkhY/s1600-h/spworkflow003.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5259597809155221538" style="CURSOR: hand" alt="" src="http://1.bp.blogspot.com/_BVcJoi56t9c/SP3YV0QeqCI/AAAAAAAAAJU/ZkVkyV_zkhY/s400/spworkflow003.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;5) For testing purposes, you can add yourself as the sole reviewer on the 2nd screen when setting up a workflow. This way, you will receive the email notifications.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_BVcJoi56t9c/SP3YV7y5ekI/AAAAAAAAAJc/RRIgZbJTtX8/s1600-h/spworkflow004.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5259597811178633794" style="CURSOR: hand" alt="" src="http://4.bp.blogspot.com/_BVcJoi56t9c/SP3YV7y5ekI/AAAAAAAAAJc/RRIgZbJTtX8/s400/spworkflow004.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;6) After saving the new workflow, return to the document library, and create a new document.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_BVcJoi56t9c/SP3YWOKTDsI/AAAAAAAAAJk/bMwnuD25CZg/s1600-h/spworkflow005.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5259597816108617410" style="CURSOR: hand" alt="" src="http://3.bp.blogspot.com/_BVcJoi56t9c/SP3YWOKTDsI/AAAAAAAAAJk/bMwnuD25CZg/s400/spworkflow005.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;7) When you first save your new document (i.e. in "Word"), you will be prompted about checking in the document. Don't worry, this is normal SharePoint behavior.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_BVcJoi56t9c/SP3aXi9velI/AAAAAAAAAJ0/6p1AOmuZSr8/s1600-h/spworkflow007.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5259600037896223314" style="CURSOR: hand" alt="" src="http://1.bp.blogspot.com/_BVcJoi56t9c/SP3aXi9velI/AAAAAAAAAJ0/6p1AOmuZSr8/s400/spworkflow007.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;8) After you save the document and go to close it, you will be greeted with the following prompts notifiying you of "Offline Editing" and checking in your document again. Go ahead and click through these screens.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_BVcJoi56t9c/SP3aX9E9NLI/AAAAAAAAAJ8/o2_Zqmxy-Hw/s1600-h/spworkflow008.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5259600044905804978" style="CURSOR: hand" alt="" src="http://4.bp.blogspot.com/_BVcJoi56t9c/SP3aX9E9NLI/AAAAAAAAAJ8/o2_Zqmxy-Hw/s400/spworkflow008.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_BVcJoi56t9c/SP3aYVYey2I/AAAAAAAAAKE/u3VGf-BwJ1U/s1600-h/spworkflow009.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5259600051430148962" style="CURSOR: hand" alt="" src="http://3.bp.blogspot.com/_BVcJoi56t9c/SP3aYVYey2I/AAAAAAAAAKE/u3VGf-BwJ1U/s400/spworkflow009.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_BVcJoi56t9c/SP3aYuCnnVI/AAAAAAAAAKM/qKI9u-U39CU/s1600-h/spworkflow010.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5259600058049338706" style="CURSOR: hand" alt="" src="http://1.bp.blogspot.com/_BVcJoi56t9c/SP3aYuCnnVI/AAAAAAAAAKM/qKI9u-U39CU/s400/spworkflow010.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;9) Once a new document is saved and checked in, you should receive an email similar to the image below (because you are a "Reviewer" in the workflow):&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_BVcJoi56t9c/SP3bXFZySAI/AAAAAAAAAKU/FN9c3f48Klg/s1600-h/spworkflow011.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5259601129472411650" style="CURSOR: hand" alt="" src="http://2.bp.blogspot.com/_BVcJoi56t9c/SP3bXFZySAI/AAAAAAAAAKU/FN9c3f48Klg/s400/spworkflow011.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;10) This is a screenshot of the workflow in progress. From here, you will want to "Edit" the task assigned to you. In this case, I'll add some feedback for the new document created.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_BVcJoi56t9c/SP3bXknxM9I/AAAAAAAAAKc/pQI4cQ7RhvE/s1600-h/spworkflow012.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5259601137852560338" style="CURSOR: hand" alt="" src="http://3.bp.blogspot.com/_BVcJoi56t9c/SP3bXknxM9I/AAAAAAAAAKc/pQI4cQ7RhvE/s400/spworkflow012.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;11) The screenshot below shows the workflow as completed and all the tasks done.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_BVcJoi56t9c/SP3bXn37kCI/AAAAAAAAAKk/7MuYPAgj0gk/s1600-h/spworkflow013.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5259601138725654562" style="CURSOR: hand" alt="" src="http://1.bp.blogspot.com/_BVcJoi56t9c/SP3bXn37kCI/AAAAAAAAAKk/7MuYPAgj0gk/s400/spworkflow013.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Congratulations on making your first workflow. Hopefully this has helped get your gears turning!&lt;br /&gt;Cheers.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/954701964661625078-6163302890778950142?l=www.jwc3.net'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JamesSandbox/~4/eha2jxG4mOw" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/JamesSandbox/~3/eha2jxG4mOw/moss-2007-simple-workflow-walkthrough.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/SP3YVJm0LNI/AAAAAAAAAJE/1G8DUczVniM/s72-c/spworkflow001.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/10/moss-2007-simple-workflow-walkthrough.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-954701964661625078.post-3098833142168032704</guid><pubDate>Fri, 26 Sep 2008 17:41:00 +0000</pubDate><atom:updated>2008-09-26T13:43:51.552-04:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Sql Server</category><category domain="http://www.blogger.com/atom/ns#">Videos</category><title>SQL Server 2008 - Policy Based Management</title><description>If you are new to SQL Server 2008 or are looking into it.  It's worth your time for 20 minutes to listen to Dan Jones from Microsoft talk about Policy Based Management which, in my opinion,  is the most important feature in SQL Server 2008.&lt;br /&gt;&lt;br /&gt;To check out the interview, go here: &lt;a href="http://edge.technet.com/Media/SQL-Server-2008-Policy-Based-Management-Interview/"&gt;http://edge.technet.com/Media/SQL-Server-2008-Policy-Based-Management-Interview/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/954701964661625078-3098833142168032704?l=www.jwc3.net'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JamesSandbox/~4/TeIymoM3-Cs" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/JamesSandbox/~3/TeIymoM3-Cs/sql-server-2008-policy-based-management.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/09/sql-server-2008-policy-based-management.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-954701964661625078.post-6004806478685350062</guid><pubDate>Thu, 25 Sep 2008 14:44:00 +0000</pubDate><atom:updated>2008-09-25T10:49:26.108-04:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Tips and Tricks</category><category domain="http://www.blogger.com/atom/ns#">VS TFS</category><title>Quick Notes: Installing VS TFS 2008 with SQL Server 2008</title><description>If you are going to install VS TFS 2008 with SQL Server 2008 as your database server, you will need to download VS TFS 2008 and merge it with your /AT folder as one installation. Sounds like a pain, because it is a pain. :)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=FF12844F-398C-4FE9-8B0D-9E84181D9923&amp;amp;displaylang=en"&gt;Download the Installation Guide specific to this situation&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Basically what you are doing is downloading VS TFS SP1 and merging it with the VS TFS Server install files so like it's installing it from the DVD as VS TFS with SP1 opposed to seperate installs which will not work in this case.&lt;br /&gt;&lt;br /&gt;Good Times.  :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/954701964661625078-6004806478685350062?l=www.jwc3.net'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JamesSandbox/~4/QOA0BuEuQUo" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/JamesSandbox/~3/QOA0BuEuQUo/quick-notes-installing-vs-tfs-2008-with.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/09/quick-notes-installing-vs-tfs-2008-with.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-954701964661625078.post-1428819925920384215</guid><pubDate>Mon, 22 Sep 2008 01:11:00 +0000</pubDate><atom:updated>2008-09-21T22:35:44.721-04:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Walkthroughs</category><category domain="http://www.blogger.com/atom/ns#">MOSS 2007</category><title>MOSS 2007 - Central Administration Walkthrough</title><description>This walkthrough is a follow up to &lt;a href="http://www.jwc3.net/2008/09/moss-2007-with-sql-server-2008.html"&gt;Installing MOSS 2007 with SQL Server 2008&lt;/a&gt; post. I did just a basic configuration that includes the following:&lt;br /&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Main Site Web Application&lt;/li&gt;&lt;li&gt;My Site Web Application&lt;/li&gt;&lt;li&gt;Site Collection&lt;/li&gt;&lt;li&gt;Shared Services Provider (SSP)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;If you have never tried to configure MOSS 2007, or if you have and didn't have any luck, you will find that it can be a bit confusing. Hopefully, this post will help things be a little less confusing for you.&lt;/p&gt;&lt;p&gt;Before we begin, go ahead and create a new user account specifically for SharePoint. The user account I created was &lt;strong&gt;svc_sharepoint&lt;/strong&gt;. I created this account locally on my server which is &lt;strong&gt;win2008-001&lt;/strong&gt;. So, if you have a domain, you would create the account there (especially if you have multiple servers involved and require SMTP service beyond the server that SharePoint is installed on). The purpose of this SharePoint account is that this will give you more control over what user authentication is processing some of the SharePoint services and &lt;strong&gt;is required&lt;/strong&gt; by some of the SharePoint services.&lt;/p&gt;&lt;/div&gt;&lt;div&gt;1) Log into your SharePoint Central Administration section (Start Menu &gt; All Programs &gt; Microsoft Office Server &gt; SharePoint Administration 3.0)&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://3.bp.blogspot.com/_BVcJoi56t9c/SNbzm78vIpI/AAAAAAAAAGE/yYj7gCbO2Sg/s1600-h/centraladmin001.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5248650265999909522" style="CURSOR: hand" alt="" src="http://3.bp.blogspot.com/_BVcJoi56t9c/SNbzm78vIpI/AAAAAAAAAGE/yYj7gCbO2Sg/s400/centraladmin001.jpg" border="0" /&gt;&lt;/a&gt; &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;2) Go ahead and click on your server name (in the image above, it's represented as &lt;strong&gt;win2008-001&lt;/strong&gt;)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_BVcJoi56t9c/SNbznCHqPeI/AAAAAAAAAGM/tHwv_mCwGx0/s1600-h/centraladmin002.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5248650267656338914" style="CURSOR: hand" alt="" src="http://3.bp.blogspot.com/_BVcJoi56t9c/SNbznCHqPeI/AAAAAAAAAGM/tHwv_mCwGx0/s400/centraladmin002.jpg" border="0" /&gt;&lt;/a&gt; &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;3) Click on "Start" for the &lt;strong&gt;Windows SharePoint Services Search&lt;/strong&gt;. Here I entered my SharePoint account I created and it's password. You should enter the username like this: &lt;strong&gt;win2008-001\svc_sharepoint&lt;/strong&gt; (domain\username) even though the picture below doesn't reflect this (my bad :) ).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_BVcJoi56t9c/SNbznIQl2XI/AAAAAAAAAGU/rmxiX1xHt0Q/s1600-h/centraladmin003.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5248650269304412530" style="CURSOR: hand" alt="" src="http://2.bp.blogspot.com/_BVcJoi56t9c/SNbznIQl2XI/AAAAAAAAAGU/rmxiX1xHt0Q/s400/centraladmin003.jpg" border="0" /&gt;&lt;/a&gt; &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;4) Just like the other service, click on the "Start" for &lt;strong&gt;Office SharePoint Search Service&lt;/strong&gt;. Fill in the information and click the start button.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_BVcJoi56t9c/SNbznvMW-0I/AAAAAAAAAGc/vOEeSMByhZI/s1600-h/centraladmin004.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5248650279755643714" style="CURSOR: hand" alt="" src="http://1.bp.blogspot.com/_BVcJoi56t9c/SNbznvMW-0I/AAAAAAAAAGc/vOEeSMByhZI/s400/centraladmin004.jpg" border="0" /&gt;&lt;/a&gt; &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;5) &lt;strong&gt;&lt;em&gt;Optional&lt;/em&gt;&lt;/strong&gt;, but if you plan to use &lt;strong&gt;Excel Services&lt;/strong&gt; in MOSS 2007, then you need to "Start" the the &lt;strong&gt;Excel Calculation Service&lt;/strong&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_BVcJoi56t9c/SNbznrfWKGI/AAAAAAAAAGk/Yi-kol_h9vg/s1600-h/centraladmin005.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5248650278761539682" style="CURSOR: hand" alt="" src="http://1.bp.blogspot.com/_BVcJoi56t9c/SNbznrfWKGI/AAAAAAAAAGk/Yi-kol_h9vg/s400/centraladmin005.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;6) Go into &lt;strong&gt;Application Management&lt;/strong&gt; and click &lt;strong&gt;Create or extend Web application&lt;/strong&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://2.bp.blogspot.com/_BVcJoi56t9c/SNbz6F69pXI/AAAAAAAAAGs/D-vjrV-gwgI/s1600-h/centraladmin006.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5248650595094340978" style="CURSOR: hand" alt="" src="http://2.bp.blogspot.com/_BVcJoi56t9c/SNbz6F69pXI/AAAAAAAAAGs/D-vjrV-gwgI/s400/centraladmin006.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;7) Feel free to read the left column, but if you are in a rush, click &lt;strong&gt;Create a new Web application&lt;/strong&gt;.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_BVcJoi56t9c/SNbz6tzurYI/AAAAAAAAAG0/l0qpQ2rPzcY/s1600-h/centraladmin007.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5248650605801418114" style="CURSOR: hand" alt="" src="http://1.bp.blogspot.com/_BVcJoi56t9c/SNbz6tzurYI/AAAAAAAAAG0/l0qpQ2rPzcY/s400/centraladmin007.jpg" border="0" /&gt;&lt;/a&gt; &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;8) The name of my new web application is &lt;strong&gt;Sphinx&lt;/strong&gt;. The host header for this is &lt;strong&gt;sphinx&lt;/strong&gt;. The port I'm going to be using is &lt;strong&gt;80&lt;/strong&gt;. I'm creating a new Application pool here and using my SharePoint account, &lt;strong&gt;svc_sharepoint&lt;/strong&gt;, for the authentication.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Note: this is very important to use a configurable authentication here for the Application pool if you are planning to have this web application use SharePoint Shared Services Provider (SSP).&lt;/em&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_BVcJoi56t9c/SNbz6voms_I/AAAAAAAAAG8/elZGjIhKXew/s1600-h/centraladmin008.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5248650606291629042" style="CURSOR: hand" alt="" src="http://1.bp.blogspot.com/_BVcJoi56t9c/SNbz6voms_I/AAAAAAAAAG8/elZGjIhKXew/s400/centraladmin008.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_BVcJoi56t9c/SNbz64jPrOI/AAAAAAAAAHE/cHL-mdOlSyY/s1600-h/centraladmin009.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5248650608685067490" style="CURSOR: hand" alt="" src="http://3.bp.blogspot.com/_BVcJoi56t9c/SNbz64jPrOI/AAAAAAAAAHE/cHL-mdOlSyY/s400/centraladmin009.jpg" border="0" /&gt;&lt;/a&gt; &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;9) If all things go well, you will get a confirmation screen like in the image below. From here, click on the &lt;strong&gt;Create Site Collection&lt;/strong&gt; link at the end of the paragraph.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_BVcJoi56t9c/SNbz7H02QgI/AAAAAAAAAHM/6llPhIWoMvY/s1600-h/centraladmin010.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5248650612785431042" style="CURSOR: hand" alt="" src="http://3.bp.blogspot.com/_BVcJoi56t9c/SNbz7H02QgI/AAAAAAAAAHM/6llPhIWoMvY/s400/centraladmin010.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;10) Select your new Web Application (it should already be selected). Give your new Site Collection a title (here I used "Sphinx"). Here the web address is just "/". This means that if you type in &lt;strong&gt;http://sphinx/&lt;/strong&gt; you will get the new SharePoint site. &lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Here you can also assign the Primary and secondary administrators. For the Walkthrough, I'm using the local Administrator account and the svc_sharepoint account. You can use any Windows user accounts you want.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_BVcJoi56t9c/SNb0dEecIlI/AAAAAAAAAHU/bnP1E3Hf5AU/s1600-h/centraladmin011.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5248651196001690194" style="CURSOR: hand" alt="" src="http://1.bp.blogspot.com/_BVcJoi56t9c/SNb0dEecIlI/AAAAAAAAAHU/bnP1E3Hf5AU/s400/centraladmin011.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_BVcJoi56t9c/SNb0dTOzSrI/AAAAAAAAAHc/MFaOjHQ7F8E/s1600-h/centraladmin012.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5248651199962630834" style="CURSOR: hand" alt="" src="http://1.bp.blogspot.com/_BVcJoi56t9c/SNb0dTOzSrI/AAAAAAAAAHc/MFaOjHQ7F8E/s400/centraladmin012.jpg" border="0" /&gt;&lt;/a&gt; &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;11) If all goes well, you will see the screen image (below).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_BVcJoi56t9c/SNb0dZu3JsI/AAAAAAAAAHk/1S8FrVwAD_U/s1600-h/centraladmin013.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5248651201707714242" style="CURSOR: hand" alt="" src="http://1.bp.blogspot.com/_BVcJoi56t9c/SNb0dZu3JsI/AAAAAAAAAHk/1S8FrVwAD_U/s400/centraladmin013.jpg" border="0" /&gt;&lt;/a&gt; &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;12) For this Walkthrough, I'm creating another Web Application: &lt;strong&gt;MySite&lt;/strong&gt;. This will handle all of the personal "MySites" for your users.&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://1.bp.blogspot.com/_BVcJoi56t9c/SNb9e5y53mI/AAAAAAAAAI8/NlUpTZfhJC8/s1600-h/centraladmin017.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5248661123099123298" style="CURSOR: hand" alt="" src="http://1.bp.blogspot.com/_BVcJoi56t9c/SNb9e5y53mI/AAAAAAAAAI8/NlUpTZfhJC8/s400/centraladmin017.jpg" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;13) If you go back to the &lt;strong&gt;Central Administration&lt;/strong&gt; start page, there will be a link on the left side that says &lt;strong&gt;Shared Services Administration&lt;/strong&gt;. Click this link and you should see a similar screen (below).&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_BVcJoi56t9c/SNb0djNQ7oI/AAAAAAAAAHs/r6ZZl3MoNdE/s1600-h/centraladmin014.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5248651204251152002" style="CURSOR: hand" alt="" src="http://3.bp.blogspot.com/_BVcJoi56t9c/SNb0djNQ7oI/AAAAAAAAAHs/r6ZZl3MoNdE/s400/centraladmin014.jpg" border="0" /&gt;&lt;/a&gt; &lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;14) Click on New SSP. Give your new SSP a name. For the Walkthrough, I used "Sphinx - Shared Services". The Web Application should be your primary (here it's "Sphinx") and the My Site Location Web Application should be your secondary (here it's "MySite").&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://2.bp.blogspot.com/_BVcJoi56t9c/SNb08gEnWAI/AAAAAAAAAIM/nKJp_s_PKX0/s1600-h/centraladmin018.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5248651735985510402" style="CURSOR: hand" alt="" src="http://2.bp.blogspot.com/_BVcJoi56t9c/SNb08gEnWAI/AAAAAAAAAIM/nKJp_s_PKX0/s400/centraladmin018.jpg" border="0" /&gt;&lt;/a&gt; &lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;15) If all goes well, you should see a similar screen (below).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_BVcJoi56t9c/SNb08vKprUI/AAAAAAAAAIU/f2s0SGs0prE/s1600-h/centraladmin019.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5248651740037360962" style="CURSOR: hand" alt="" src="http://4.bp.blogspot.com/_BVcJoi56t9c/SNb08vKprUI/AAAAAAAAAIU/f2s0SGs0prE/s400/centraladmin019.jpg" border="0" /&gt;&lt;/a&gt; &lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;Optional: If you do not have access to a DNS server or are not running DNS on your server, then you can perform the following steps to resolve the new SharePoint site on the server (you can also perform this step on networked computers as well, just replace 127.0.0.1 with the IP address assigned to your SharePoint server)&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;15) Go to &lt;strong&gt;Start Menu &gt; All Programs &gt; Accessories &gt; NotePad&lt;/strong&gt; (Right-Click on the shortcut and say "Run as Administrator" -- this is for Server 2008 / Vista Only)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_BVcJoi56t9c/SNb0885W9qI/AAAAAAAAAIc/3wr0JchWGWc/s1600-h/centraladmin020.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5248651743722927778" style="CURSOR: hand" alt="" src="http://2.bp.blogspot.com/_BVcJoi56t9c/SNb0885W9qI/AAAAAAAAAIc/3wr0JchWGWc/s400/centraladmin020.jpg" border="0" /&gt;&lt;/a&gt; &lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;16) Go to &lt;strong&gt;File &gt; Open&lt;/strong&gt; and navigate to the file of &lt;strong&gt;C:\Windows\System32\Drivers\Etc\hosts&lt;/strong&gt; (you will have to change it to "All Files" to show opposed to just "Text Files")&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_BVcJoi56t9c/SNb1UXWGH2I/AAAAAAAAAIk/NTSIsoSiewg/s1600-h/centraladmin021.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5248652145959772002" style="CURSOR: hand" alt="" src="http://4.bp.blogspot.com/_BVcJoi56t9c/SNb1UXWGH2I/AAAAAAAAAIk/NTSIsoSiewg/s400/centraladmin021.jpg" border="0" /&gt;&lt;/a&gt; &lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;17) Once open, add the following lines (replace Sphinx with your SharePoint name):&lt;/div&gt;&lt;div&gt;127.0.0.1 sphinx&lt;/div&gt;&lt;div&gt;127.0.0.1 mysite&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_BVcJoi56t9c/SNb1UnyyKJI/AAAAAAAAAIs/M2nreLenisU/s1600-h/centraladmin022.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5248652150375065746" style="CURSOR: hand" alt="" src="http://1.bp.blogspot.com/_BVcJoi56t9c/SNb1UnyyKJI/AAAAAAAAAIs/M2nreLenisU/s400/centraladmin022.jpg" border="0" /&gt;&lt;/a&gt; &lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;18) Finally, &lt;strong&gt;close all open Microsoft Internet Explorer browsers&lt;/strong&gt; and open up Internet Explorer. Navigate to your SharePoint site (here it would be &lt;strong&gt;&lt;em&gt;http://sphinx&lt;/em&gt;&lt;/strong&gt;). I used the &lt;strong&gt;Portal Collaboration&lt;/strong&gt; template for the Sphinx site. If you used the same template, then your screen should look like below. It will prompt you to login, just use your primary site administrator account to log in. Here I used &lt;strong&gt;win2008-001\administrator&lt;/strong&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_BVcJoi56t9c/SNb1UwhENqI/AAAAAAAAAI0/OtzHNCWGx3o/s1600-h/centraladmin023.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5248652152716670626" style="CURSOR: hand" alt="" src="http://4.bp.blogspot.com/_BVcJoi56t9c/SNb1UwhENqI/AAAAAAAAAI0/OtzHNCWGx3o/s400/centraladmin023.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;Enjoy!&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/954701964661625078-1428819925920384215?l=www.jwc3.net'/&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JamesSandbox/~4/rmNjkZkHUJ4" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/JamesSandbox/~3/rmNjkZkHUJ4/moss-2007-central-administration.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/SNbzm78vIpI/AAAAAAAAAGE/yYj7gCbO2Sg/s72-c/centraladmin001.jpg" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">3</thr:total><feedburner:origLink>http://www.jwc3.net/2008/09/moss-2007-central-administration.html</feedburner:origLink></item></channel></rss>
