Building a Hello World Web Part for Windows SharePoint Services 3.0
page 7 of 9
by Steven Barden
Average Rating: 
Views (Total / Last 10 Days): 38309/ 83

Part 4: Testing The New WebPart

1.    Open your website. At this point your new Web Part is not yet an option to be selected and must be enabled for use.

2.    Open the Site Settings.

3.    Under Galleries click the Web Parts link.

4.    Web Parts are controlled by XML files. But in this case we did not craft an xml file for this webpart. The act of enabling this webpart for use will assist with this need.

5.    Click New, which causes SharePoint to read the Web.config file. It reads the config and uses reflection to build the information needed to allow you to use the webpart.

6.    You should now see the Hello webpart. Click the Populate Webpart option.

7.    Now back in the main Web Part Gallery page, take a minute to review the webpart properties by clicking on the Edit link button. Click on the View Xml link. You may find this bare-bones config file useful in other development tasks.

8.    Now go to the main page. Click on Site Settings, and edit page. In the middle, click on Add A Web Part and locate the Hello webpart.

9.    Your webpart should now be displayed.

View Entire Article

User Comments

Title: There is no Web.confg file   
Name: Steven Barden
Date: 2010-03-05 6:05:31 AM
The reason there is no Web.config is because this project is not a web project. It is a web-based component that will be added into SharePoint, which is a web-application and will have it's own web.config. That said, you will have to register your web componenet with the web you want to show it from... actually with the site collection. (site collections and webs are another topic). So think of your web-part as being a specialized user-conrol. The user-control can be developed alone, then added to a web-project. That is the case here as well. I hope this helps.
Title: There is no Web.confg file   
Name: HelloWorld
Date: 2010-03-05 5:57:16 AM
There is no Web.config file in my VS.
What to do next?
Title: Great   
Name: GRF
Date: 2009-09-03 4:43:03 AM
Your tutorial opens me a new world!
Title: Outstanding   
Name: kp
Date: 2009-03-03 6:44:40 AM
Really clear and good
Title: Outstanding!   
Name: kp
Date: 2008-11-17 5:12:53 AM
Really clear and good
Title: really good   
Name: Tom Morris
Date: 2008-09-23 5:56:39 AM
Really good introducing!thx
Title: AWESOME   
Name: M.Czarnecki
Date: 2007-11-02 2:43:03 PM
Absolutely fantastic.
You really reamoved all the bloat and the ridiculous hoops that MS wants us to go through. I don't have time for all that garbage. Your tutorial is a gem.

Product Spotlight
Product Spotlight 

Community Advice: ASP | SQL | XML | Regular Expressions | Windows

©Copyright 1998-2024  |  Page Processed at 2024-04-22 4:30:07 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search