1,726 articles and 13,240 comments as of Wednesday, October 13th, 2010

Thursday, October 7, 2010

SharePoint: Integrate ASP.net controls with Forms – Part 2: Adding a DVWP Form to the page

Guest Author: Matt Bramer
http://mattbramer.blogspot.com

If this post doesn’t make any sense, please read over the first post in this series. I’m going to keep building on each post and then tying them together at the end.

Now that Mark Miller has allowed the cowboy to run wild, let’s jump into setting up this DVWP (Data View Web Part) Edit Form. I always add a Web Part Zone to every custom page that I create. Adding these zones allow you to easily modify the page by clicking on Site Actions > Edit Page.

Adding the Web Part Zone

Let’s first click in the correct area of the table, so we’ll get the placement of this zone just right. If you remember, we had a table with 2 columns and 2 rows. The first cell in this table is where we added the data source and the ASP.net control. Directly below this, let’s add this zone. Refer to this screenshot if this sounds confusing.


With that out of the way, here’s how to add a Web Part Zone: Click Insert > SharePoint Controls > Web Part Zone.


Now onto the meat and potatoes…

What I like to do is click on that Zone and insert my Web Parts. After all, that is what it says to do right? Doing so, makes sure you are adding the DVWP to the correct location. Here’s the steps to add the Edit Form to the page: Click Data View > Insert Data View…


Find your Shared Documents Library on the right within the Data Source Library Pane. Click on the drop-down menu and select Show Data.


This will display all of the columns within your Library. Within my library, I have a custom column already setup. I’ve called it DocCategory. I’m going to select every column (metadata), I’d like to have available for editing on my page. After doing that, you’ll want to click: Insert Fields As > Single Item Form.


I only have two columns, but that’s all that I need for this example. Feel free to have 10, if you want! The more columns you bring to the page, the more columns you’ll be able to edit.

But it still doesn’t do anything!!!

I know, I know… Stick with me and I’m sure you’ll find something useful. So far, we’ve added our ASP.net drop-down list, a Web Part Zone, and a DVWP Edit Form. Here’s a screenshot of where we should be at this point:


The next few articles, I’ll show you how to filter this Web Part using the ASP.net control and create a more dynamic Edit Form. If you have a question or suggestion, feel free to post a comment. I’ve already come up with a few myself. Please don’t be shy because you don’t understand the title. I love screenshots and am a visual learner. I promise you will get plenty of screenshots along the way. If you need more, maybe I’ll do a video, just let me know if something isn’t making sense.

Guest Author: Matt Bramer
http://mattbramer.blogspot.com

Matt Bramer works as a Systems Admin in the construction industry.  He has been working with Search Server Express since 2008 and frequently blogs about his findings at http://mattbramer.blogspot.com.  Matt often posts to Stump the Panel and likes to tweet about his IT projects on Twitter (@iOnline247).

View all entries in this series: SharePoint: Integrate ASP.net controls with Forms»
Entries in this series:
  1. SharePoint: Integrate ASP.net controls with Forms - Part 1: Use a SP Datasource to push values to a drop-down menu control
  2. SharePoint: Integrate ASP.net controls with Forms - Part 2: Adding a DVWP Form to the page
 

Please Join the Discussion

2 Responses to “SharePoint: Integrate ASP.net controls with Forms – Part 2: Adding a DVWP Form to the page”
  1. Jeff Jones says:

    For videos I like http://www.vimeo.com as a good way to host them. Unlimited duration, free, just have to wait for the encoding after upload. Michael Gannotti uses this for his and it’s a good tool to know about.

    • Matt Bramer says:

      Thanks for the tip! I may end up doing one. I downloaded Community Clips, so I’m ready. Just depends if people would like to have that. I’m not sure of that just yet.


Notify me of comments to this article:


Speak and you will be heard.

We check comments hourly.
If you want a pic to show with your comment, go get a gravatar!