in

SharePoint Blogs

The Best Place for SharePoint-related Blogs

rcragg's blog

Using the Form Web Part to pass parameters to a DataView Web Part

I have been reading this article  Building XML Data-Driven Web Sites with FrontPage 2003

...and in the section on adding Data View Web Parts, it states that, when adding a connection to a SQL Stored Proc, or a Web Service:

"you can supply parameters at runtime. The Default Value combo box supplies several options, including [QueryString(arg)] and [Form(arg)]. Select [QueryString(arg)] if you will be supplying the parameter at runtime via a querystring item."

However, it wasn't made at all clear how you would do this in practice, I know what forms and querystrings are but at first I couldn't fathom how you are supposed to pass these parameters to the Web Part. Also, it is not clear whether you can use web part connections (i.e. a provider web part on the same page) to supply the parameter to the consumer web part at runtime. I would have thought this is the ideal way to use dataview web parts without needing to do any coding?... so I started to do some digging.

So then I have discovered 'Insert | Form | Form Web Part' in FrontPage which looked promising. I put one onto the page and made a web part connection to my dataview web part with the following settings

Source Web Part: Form Web Part
Source action: Provide Form Values To
Target Web Part: [my dataview web part]
Target action: Modify View Using Parameters From

...and it just works!

NB: After much tearing out of hair I also discovered this article, which states that you need to enable update support before you can used Stored Procs in FrontPage

Comments

No Comments

Leave a Comment

(required )  
(optional )
(required )  
Add

Need SharePoint Training? Attend a SharePoint Bootcamp!

Posts (c) their respective authors. Everything else (c) 2007 SharePoint Experts