Mike
Wed Jun 08 23:26:10 CDT 2005
Good that you found it.
Could you post a message to the subnewsgroup for WSS Programming at
microsoft.public.sharepoint.windowsservices.development
containing both the problem and the solution so that the WSS Programming
guys there are made aware of it.
(If you are in future looking for programming solutions, just post there)
Mike Walsh, Helsinki, Finland
"David Kyle" <David Kyle@discussions.microsoft.com> wrote in message
news:C24CC68E-2350-4644-911A-3F70DD2F4884@microsoft.com...
> For group information, I found the answer.
>
> You can use the SPPropertyBag collection to hold metadata regarding the
> site. Here is the post from Troy Star at Microsoft:
>
> The SPPropertyBag class inherits from the
> System.Collections.Specialized.StringDictionary class, so I recommend
> reviewing that class to better understand how to interact with the
> SPPropertyBag.
>
> Here's a C# example...
>
>
> SPSite site = new SPSite("
http://servername/sites/sitename");
> SPWeb web = site.OpenWeb();
>
>
> foreach (string key in web.Properties.Keys)
> {
> System.Console.WriteLine(key + " = " + web.Properties[key]);
>
>
>
> }
>
>
> if (web.Properties.ContainsKey("foobar") == false)
> {
> web.Properties.Add("foobar", "value1");
>
> }
>
>
> else
> {
> web.Properties["foobar"] = "value2";
>
> }
>
>
> web.Properties.Update();
>
> foreach (string key in web.Properties.Keys)
> {
> System.Console.WriteLine(key + " = " + web.Properties[key]);
>
>
>
> }
>
>
> web.Close();
> site.Close();
>
> -
>
>
> Troy Starr [MSFT]
> This posting is provided "AS IS" with no warranties, and
> confers
> no
> rights
>
>
> .
> Use of included script samples are subject to the terms specified at
>
http://www.microsoft.com/info/cpyright.htm
>
>
> "Mike Walsh" wrote:
>
>> Do you already have the information available to you ? (You mentioned
>> duplicate) Where is it now ?
>>
>> Mike Walsh, Helsinki, Finland
>>
>> "S. David Kyle" <SDavidKyle@discussions.microsoft.com> wrote in message
>> news:9B68982A-469D-47F3-96C9-D8BFAC489F7A@microsoft.com...
>> > Thanks for answering Mike. I thought about that--I wouldn't want
>> > duplicate
>> > entries, although I suppose I could hide or secure the list...
>> >
>> > I was just wondering if there was any facility for storing singular
>> > inforamtion at the site level.
>> >
>> > david
>> >
>> >
>> > "Mike Walsh" wrote:
>> >
>> >> Is there anything against you creating a (WSS) custom list with these
>> >> fields
>> >> ?
>> >>
>> >> Mike Walsh, Helsinki, Finland
>> >> WSS FAQ at
http://wss.collutions.com
>> >> Please reply to the newsgroup
>> >>
>> >> "S. David Kyle" <S. David Kyle@discussions.microsoft.com> wrote in
>> >> message
>> >> news:B9A2A7A1-309A-43A2-BEB3-B263E2A9587C@microsoft.com...
>> >> > Is there a way to store data at the site level--that is, inforamtion
>> >> > about
>> >> > the site. Information such as milestone dates, organizer, start and
>> >> > end
>> >> > dates
>> >> > are what I want to store. I would prefer not to have to create an
>> >> > external
>> >> > database to store this information and use some facility within
>> >> > Sharepoint.
>> >> >
>> >> > Thanks,
>> >> > david
>> >>
>> >>
>> >>
>>
>>
>>