Hello, you know Visual Studio 2010 can be call a Visual Studio for SharePoint, because it supports some project templates, deploy and debug tool for SharePoint and so on.
Please see some steps here to make a simple web part for SharePoint 2010 with Visual Studio 2010.
1. Open Visual Studio 2010
2. Create new project for webpart
3. Select project templates of SharePoint 2010
4. Select Visual Web Part project template
5. Change default project name to any name that we like, here I choose “HelloWebPart” then click “OK”
6. Select a SharePoint hot to deploy this webpart, here I choose my local SharePoint hot http://Thomas/ then click finish
7. The HelloWebPart on visual 2010 look like
8. Select Design mode
9. Drag a label, textbox and button to the design like that
10 Double click on “Button” to make a simple change for server click event like
11. Change all file name to HelloWebPart like that
12. Change Title and Discription for HelloWebPart.webpart like
13. Now can be click on “Start debugging” or press F5 we go direct to browser with SharePoint
14. Click on Edit to edit our SharePoint page
15. Click on “Insert”
16. The Insert look like
17. Select HelloWebPart from Custom Categories with the Insert mode
18. Click on “Add”
19. So the Hello WebPart like that
20. Click Page then click “Save & Close” to save our change for page
21. Type your name inside textbox like “Mr. Luke” then click button you see like that
God bless you!
No comments:
Post a Comment