title: In a SharePoint web part, how do I set a web part's list during run-time?
body: <p>I have a Contact List web part I developed that is dependent on a custom list I created, also called Contact List. But instead of the web part ALWAYS requiring a list called Contact List whenever the web part is added to a page, I want it so I can add the web part to a page THEN set which list I want it to use. I guess I am asking how do you create custom properties for a web part, much like the baked-in properties of web parts you get when you click on the web part and then click Modify Shared Web Part.</p>
  
  <p>The reason I want to do this is because I intend on adding a List Template called Contact List Template. Them, whenever I want to display a contact list, I just create a specific list from the list template, then tie that new list to my web part that displays the list.</p>
  
  <p>I envision it would work like this:
  1. I create a contact list from Contact List Template, say "Sales Contact List"
  2. I then add the Contact List web part to the page
  3. Finally, I set the web part's custom property (let's call it ContactListSourceList)
     to "Sales Contact List"
  4. The web part then works as it currently does where it retrieves the data from the
     list and displays it.</p>
  
  <p>BTW, I speak VB better than C#, although I can figure out C# if I have to. Any help would be greatly appreciated.</p>