Creating a SharePoint 2010 Web Part with VIsual Studio 2010
This is a video demonstration of how to create a basic Web Part for SharePoint 2010 using Visual Studio 2010. The intent of the video is to showcase how easy it is to create, package and deploy a Web Part into a test environment with the latest tools. The demonstration was done on a Virtual Machine running under Hyper-V with Visual Studio installed along side SharePoint. For more information about our classes related to this video, please vist: www.webucator.com To hear about the latest contests, news, blogs, and training, subscribe to our newsletter: www.webucator.com
Comments
9 Responses to “Creating a SharePoint 2010 Web Part with VIsual Studio 2010”
Leave a Reply
You must be logged in to post a comment.
great job
Great video.
Is it possible to use VS to develop the web part while SharePoint is installed on another server in the network? I am getting an error from VS saying SP is not installed…
The Visual Studio 2010 SharePoint templates expect you to have a local installation of SharePoint 2010. While it’s probably possible to develop on a machine without SharePoint installed you would probably have to create and package them manually, i.e. not use the SharePoint project templates. Using the templates is the recommended route especially since it automatically creates package files that can easily be moved from your development machine to a production server.
thank you very much for the video and just wanted to ask you a question, about the SharePoint development environment setup and its recommend to have a VM with Windows Server and Visual Studio on it, use this for development. is that correct?
do you have more video on sharepoint web part? can you redirect me – thanks
Using a VM is a great option because you can take snapshots of your configuration and revert changes back to the snapshot. Running Server 2008 is the easiest for installation and arguably the best for consistency although you can modify the SharePoint installation to work on Windows 7. There is also a boot to VHD option with a Windows 7 machine that will allow you to boot into a different OS such as Server 2008 installed in a VHD file.
Great video thanks. Wondering, do you have any videos showing any of the following?
1 – creating an entire SharePoint page from VS as an aspx opposed to just a web part?
2 – Creating a web part to provision a site?
Much appreciated!
Hi I have an issue with my code. When I debug it and deploy it, it only shows the name of the webapp but doesnt do anything. Any suggestions?
You can always set a breakpoint and step through the code, Visual Studio will handle attaching to the proper process running on the SharePoint server for you. Make sure you are getting data back from the “ExecuteReader” method of the SqlCommand object. If you are getting data back make sure you are calling the “DataBind” method of the DropDownList control and that you add the control the WebPart’s Controls collection property.