Clear Internet Explorer Cache Command Line

During a recent project where I was creating a SharePoint feature I had the need to clear the browser cache before starting a new debug session.  The feature was all JavaScript and I wanted to be sure I was getting the latest version.  So, I added this command to the post build event.

InetCpl.cpl,ClearMyTracksByProcess 8

I have also used this in trouble shooting browser issues with clients, the easiest way to know for sure they have cleared their browser cache.

How to Upload a Document with Properties using SharePoint 2010 Client Object Model

Today I came across the need to be able to upload documents to a SharePoint list.  Not so bad, I have done this before, but this time I also need to populate some custom metadata about the document.  After a lot of looking, searching and exceptions I finally found the answer and here it is.

Add References to Microsoft.SharePoint.Client Library

Install-Package Microsoft.SharePoint.Client

Define a form

The important part I always forget is the enctype=”multipart/form-data”.

 1: <form id="formUpload" method="POST" enctype="multipart/form-data ">
 2:     <input type="file" id="fileUpload" name="fileUpload" runat="server"/>
 3:     <input type="submit" value="upload" 
 4:         OnServerClick="btnUploadTheFile_Click" runat="server"/>
 5: </form>

The btnUploadTheFile_Click Handler

 1: private void UpLoadToSharePoint()
 2:  {
 3:     var fileName = Path.GetFileName(fileUpload.PostedFile.FileName);
 4:     var fileStream = new FileStream(fileUpload.PostedFile.FileName, FileMode.Open);
 5:     var byteStream = new byte[fileStream.Length];
 6:     fileStream.Read(byteStream, 0, byteStream.Length);
 7:  
 8:     var serverRelativeUrl = "/MySite/MyDocumentLibrary/" + fileName;
 9:  
 10:     var fileCreationInformation = new FileCreationInformation
 11:     {
 12:         Content = byteStream, 
 13:         Overwrite = true, 
 14:         Url = serverRelativeUrl
 15:     };
 16:  
 17:     var file = _sharePointList.RootFolder.Files.Add(fileCreationInformation);
 18:     file.ListItemAllFields["Column 1"] = "Value 1";
 19:     file.ListItemAllFields["Column 2"] = "Value 2";
 20:     file.ListItemAllFields.Update();
 21:     
 22:     _sharePointContext.ExecuteQuery();
 23: }

Summary

This simple example shows how easy it is to upload a file to a SharePoint document list and provide additional column information.

Domain Events TechFest Update

Last Friday I presented on Domain Events at the Northwest Arkansas Techfest and there was a lot of interest and good discussions.  Thanks to everyone who attended the session.  I have updated the nuget packages to the latest release and have created some initial documentation located here.  From there you can find links to the project site (full source available) and wiki. 

The source also includes an example application as well as the demo script for the demo I used in my presentation.  The demo script is step by step instructions to re-create the demo from the presentation.

As I mentioned in the session this code is publicly available and I do accept feature and pull request, see the project wiki for how you can contribute.

How-To: Community Leadership Town Hall

TownHall Banner

How to Host a Community Leadership Town Hall

I was recently asked if I would be hosting a Community Leadership Town Hall in Tulsa again this year.  I will not be attending so I thought I would share what is needed and how to host a Community Leadership Town Hall in case there are others that would be interested in doing so.

Things you need:

  • Category Signs: Membership, Leadership, Speakers, Sponsors, Meetings, Other
  • 4x4 or 3x3 Sticky Notes, enough for everyone to write topics, questions, etc.
  • Pens, I usually have a bundle of about 20 pens
  • Color Coding Labels, i.e. dots used for voting

Room Setup

Stick up the Category signs around the room.  Be sure to allow enough room for people to walk around and look over each others shoulders.   These areas get pretty crowded during the Topic\Question and Voting sections.

Get 4 chairs that you can setup in the center of the room.  This is the fish bowl and is where the main discussions will happened once the topics are organized.  This is also a good way to keep the discussion close to microphones if you plan on recording it.

Introduction

Time: 5 Minutes

In this section of the event you want to welcome everyone and let them know how the night will go.  You can also ask if any of them are familiar with Open Space Technology events.  This is a variation of that formula.  This event is going to be only as good as what the attendees put into it, stress that and let them know they have a critical part to play in making it a success. 

Topics\Questions

Time: 10 Minutes

Let them know that you will give them 10 minutes to write down questions or topics they would like to discuss. They don’t have to lead the discussion, just have the need or knowledge to share. Tell them they will need to write down the Topic\Question\Idea on a sticky note and then stick it on the wall under the Category that if best fits into.  The things you want on the sticky notes; The topic/question and who wrote it.  This helps later when you ask them to go over it in more detail and to take a set in the fish bowl to start the discussion.

Voting

Time: 10 Minutest

During the voting each person should read over the sticky notes posted and if they feel strongly about a topic they can vote on it by putting one of their dots on it.  Once time is up have everyone return to their sets.

Tally

Time: 5 Minutes

Now you need to look over each category and find like items.  Those that are similar or have a common theme and group them together.  Once you finish that make a tally of which sticky notes have the most votes, counting similar themes as a single item.  Organize the sticky notes in order from largest number of votes to smallest.  This is now your agenda for the rest of the event.  You want to do this quickly since everyone else is sitting around waiting, help can make this go faster.

The Fish Bowl

The fish bowl is where the real discussion happens.  This is also a great way to control the amount of time spent on each topic making sure that everyone topics get a chance to be covered.  Remember the 4 chairs?  Ask the person that wrote the sticky to take a seat.  Explain the fish bowl, only those seated in a chair can comment and one chair must remain empty at all times.  Simple rules but it can make for some confusion.  This is much like Survivor, if someone new shows up (sits in the empty chair) someone must vote themselves off the island (leave their chair).  A great way to wind the discussion down and keep it on time is to pull the empty chair away every 5 minutes.  Remember one chair must remain empty, since the empty chair is gone, someone has to get up.  Continue this until there is one person and one chair left.  When they finish, they have to get up the discussion is over.

Reset the chairs and start the next topic.

Summary

This a great open format for experts and those interested in a topic to share information. The events I have hosted in Houston, Dallas, and Tulsa have not only been informative they have been a lot of fun.  You can also get a sponsor to cover food if you want to offer a meal to you attendees.  This is an attendee lead event and the more input you get from them the better the event is.  You job for hosting a Community Leadership Town Hall is well to host.  You are just there to get everyone else talking, and they will just give them the floor and see what happens.

Northwest Arkansas Techfest Update

TechFest_Splash_400_242

This Friday, August 24, 2012 8:00 AM – 5:00 PM

I will be presenting two sessions at this years Northwest Arkansas Techfest.  If you haven’t already head on over to http://nwatechfest.com and register.  This year is looking like it will be even bigger than events in the past.  Go out and support your local technology conference and help make this an awesome event.

Here is the information about the sessions I will be presenting.

0 to 60 With Highway.Data

In this session we will take an look at Highway.Data and how it makes it easy to get up and running with Entity Framework. Highway.Data is part of the Highway Framework being developed by Tim Rayburn and Devlin Liles. This framework pulls together all the best practices of their Entity Framework 4.1 Expert's Cookbook book into a framework that makes consuming data much easier. This session will cover the newly release version 2.0 of Highway.Data.

Track: Big and Small Data
Time: 1:00 PM

Domain Eventing, Using Domain Events to create more composable applications.

In this session I will present a strategy I have implemented for using events in the domain model to make applications more composable. Domain Events allow you define system events and then implement handlers that take action when those events occur.

Track: Advanced Development
Time: 2:00 PM

I’d love to have you stop my one of my sessions and give feedback on the content and direction.  Each of my sessions is already or working toward creating a reusable library that will be made available via nuget.  So, your input at this stage can influence future releases.

Calendar

<<  December 2014  >>
MonTueWedThuFriSatSun
24252627282930
1234567
891011121314
15161718192021
22232425262728
2930311234

View posts in large calendar

Month List