How to make a web part configurable?

George2
  • How to make a web part configurable? George2

    I am using SharePoint Server 2007 Enterprise with Windows Server 2008 Enterprise. I am using publishing portal template.

    I am developing using VSTS 2008 + C# + .Net 3.5. I want to develop a WebPart and make some settings configurable (just like we can configure parameter for a console application in app.config) -- i.e. authorized people could set parameters of WebPart in Edit Page (from browser based UI interface), then select -> Modify WebPart properties, or edit parameter in SharePoint Designer.

    Such parameter is application specific custom parameters.

    Any solutions and referenced samples?

  • The properties should be built into just about any how to or sample project.

        [WebBrowsable(true), Personalizable(true)]
        public string DefaultText
        {
            get { return defaultText; }
            set { defaultText = value; }
        }
    

Tags
web-part development
Related questions and answers
  • I am using SharePoint Server 2007 Enterprise with Windows Server 2008 Enterprise, and I am using publishing portal template. I have created a list in top level site. And I want to use the list in a child site (e.g. adding the list to a page in child site by using Page --> Add Web Parts --> Browse), but can not find the list created in parent site in this way. Any ideas how to use the list (created in parent site) in a child site? BTW: I can use the list (created in parent site) in parent site without any issues.

  • I am using SharePoint Server 2007 Enterprise with Windows Server 2008 Enterprise, and I am using publishing portal template. I am using SharePoint Designer 2007 to design pages. When I open the default.aspx under Pages sub-folder of a site, there are two options: Edit in Browser and Edit Page Layout. I want to know what are the differences between Edit in Browser and Edit Page Layout -- especially what is the function of Edit Page Layout, because when I select Edit Page Layout, WelcomeSplash.aspx opens in SharePoint Designer, other than default.aspx itself (very confused). thanks

  • I am using SharePoint Server 2007 Enterprise with Windows Server 2008 Enterprise, and I am using publishing portal template. I have created a web application for intranet zone. I want to know how to change the port number of the web application? Could I change it directly in IIS manager (is this way safe)?

  • I am using SharePoint Server 2007 Enterprise with Windows Server 2008 Enterprise, and I am using publishing portal template. I have two sites of the same site colleciton and I want to use Data Source Library to make site A be able to use lists defined in site B. From site A, I am using "Connect to another library" to add site B. And from Data Source Library of site A, I can see lists defined in site B. My question is how to use such lists in a page of site A? I followed the guide here, http://office.microsoft.com/en-us/sharepointdesigner/HA101191181033.aspx

  • I am using SharePoint Server 2007 Enterprise with Windows Server 2008 Enterprise. I am using publishing portal template. I am creating a list with the default "Title" column -- Title (linked to item). I want to make anonymous users to be able to view list content and also wants anonymous users to be able to click the Title link to see item details. But I find when I clicked Title link, I have to login in order to view item details. Any solutions to make anonymous user to be able to click and view Title link? thanks in advance!

  • I am using SharePoint Server 2007 Enterprise with Windows Server 2008 Enterprise. I met with strange SharePoint internal error when click some links on a web site. I have tried to use SPTraceView (http://sptraceview.codeplex.com/) to dump related logs, I find the following error logs, any ideas what is wrong? I am not sure whether in my scenario, using SPTraceView is the best way to diagnose, any better ideas to diagnose? Application Server Job failed for service instance Microsoft.Office.Server.Search.Administrator.SearchServiceInstance(xxxxxxxx-xxx GUID) Reason: access to file "C

  • I am using SharePoint Server 2007 Enterprise with Windows Server 2008 Enterprise. I am developing using VSTS 2008 + C# + .Net 3.5 + ASP.Net. I want to develop a WebPart, like a tab based control, like task manager, items (e.g. processes, users, etc.) are managed by tab on the top for different categories, and in each category tab, items are organized in list. I need to get information about which tab is selected in my requirement. Any reference code or document?

  • Possible Duplicate: Integrating SharePoint user profiles with forms authentication I am using SharePoint Server 2007 Enterprise with Windows Server 2008 Enterprise. I have deployed a publishing portal. It is using a custom forms authentication solution, which is described in the following URL. I am developing using VSTS 2008 + C# + .Net 3.5 + ASP.Net + SharePoint Server 2007 SDK. http://msdn.microsoft.com/en-us/library/bb975135.aspx My question is how do I implement a user profile function if I use such a membership provider? By user profile function I mean: a logged in user could

  • I am using SharePoint 2007 + Windows Server 2008 with SharePoint 2007's publishing portal template. I am using List Web Part with Data Sheet view. I want to know how to make a column as a URL link (i.e. show text in the cell, and can associate a link with the text in each row for the specific column), i.e. when user clicks the text in the specific column of a specific row, the user will be directed to the link associated the text.

Data information