.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Accessing Parameter Value from a Web Part Connection

Posted By:      Posted Date: October 11, 2010    Points: 0   Category :SharePoint

I have two data views on a page and have created a web part connection to pass a value as a parameter from data view #1 to data view #2.  I have done this before with no problem, however in the past I've always used the parameter as part of a filter.  What I need to do in the current scenario is reference the parameter value as part of the redirect path in a form action button.  When I attempt to reference the parameter value, or even just display it anywhere in the data view, I get nothing; however if I display a query string parameter from the same data view it works fine.  Is there something different about using a web part connection parameter that I'm missing in order to reference it within the xsl stylesheet for the data view?

MOSS 2007, SPD 2007


View Complete Post

More Related Resource Links

How to pass a parameter from a choice filter with project IDs to a KPI web part?



I have an excel pivot table like this:

Report Filter: Project ID
proj_name     Status 
A              70
B              60
C              80

I have this workbook published onto Sharepoint server through excel services.
On the site i have a choice filter that has all the project ID's. I am able to show this table in a web part and filter the web part by passing parameter from the choice filter to the report filter in the workbook as shown above.
I added a KPI webpart that uses the "status" from the above table as its indicator value. What I want to do is that I want to pass the parameter from the choice filter on the site to this KPI web part so that it will show me the corresponding status dynamically accoring to the project chosen.
Can someone help me solve this problem?

Quick Note: Accessing Data in a SharePoint 2010 Web Part by using LINQ

In this exercise, you develop and deploy a visual Web Part that reads data from two lists by using a LINQ query and displays it in a DataGrid control.

Is it possible to give parameter to the Page Viewer web part?

Page viewer web part gives iView to the website eg. http://www.test.com. This works fine! Our customer would like give parameters like http://www.test.com/abc?name=John. First question is that is it possible to give personalized parameters to the url? Any chances to give SharePoint user name as parameter?  Kenny_I

Having problem accessing multi-choice parameter in SQL Query in Report.

Hi, I have a report with a multi-choice input parameter. My report contains a dataset that uses CHARINDEX on this multichoice parameter. The dataset query is in text, not in stored procedure. When I run the report I get "the charindex requires 2-3 arguments the reason being that the SQL is run as follows (You can see the multi-choice list screws up the string: exec sp_executesql N'Select test.Region [Region], test.Location [Location], nvarchar3 [Year], nvarchar4 [StatisticType], nvarchar5 [StatisticType2], ntext2 [Detail], float1 [Amount]   from [WSS_Content].[dbo].[AllUserData] UD   inner join [WSS_Content].[dbo].[AllLists] AL on AL.tp_ID = UD.tp_ListId and AL.tp_Title=''Statistics''   left outer join   (       Select UD.tp_id [ID],nvarchar1 [Region],     nvarchar3 [Location]   from [WSS_Content].[dbo].[AllUserData] UD   inner join [WSS_Content].[dbo].[AllLists] AL on AL.tp_ID = UD.tp_ListID and AL.tp_Title=''Regions''   where UD.tp_ListId = AL.tp_ID   and UD.tp_ListId = AL.tp_ID   and UD.tp_DeleteTransactionId = 0x0   and tp_IsCurrentVersion = 1   ) test on test.id = UD.int1   where UD.tp_ListId = AL.tp_ID   and UD.tp_ListId = AL.tp_ID   and UD.tp_DeleteTransactionId = 0x0   and tp_IsCurrentVersion = 1  &n

Sharepoint Filter Web Part Connection to Picture Libary Web Part

It seems that a sharepoint or choice filter web part can connect to any list object in sharepoint that is displayed in a web part on a page but the picture library.  I want to allow the user to select a value so that only the image that applies is viewed (along with any correlating information stored in its library). Is there a work around for this?  I've looked all over the web and can only find where someone else has asked in another forum and has not yet received an answer.  I'm sure this isn't the first time this has come up, so what are folks doing to accomplish this?

Parameter in PerformancePoint Connection


Hi all,

I have a SSAS Cube with Translations, Default (English) and Portuguese (Portugal), and i need to use these translations from PerformancePoint. I can use it from Reporting Services by defining a connection with a Language parameter (http://blogs.msdn.com/b/bimusings/archive/2007/01/11/happiness-is-automatic-sql-reporting-services-localization.aspx).

Now i want to do something similar from PerformancePoint, but i don't know how. Can somebody help me?

Thanks in advance.

Report viewer web part: Dependency of parameter choices on user rights?


Hi there,

I am wondering if it is possible to restrict the choices for a parameter depending on the user rights. For instance, if an "administrator" can select three different options for one particular parameter, a "normal user" should only be able to choose from two.

I am using Sharepoint 2007 and Reporting Services 2005.

Best wishes



Can I assign a property of a custom web part via a URL parameter?


Hi there,

I am wondering if it is possible to assign the properties of a custom web part by passing parameters to the sharepoint URL of that web part.

Thanks and best wishes


Save as template kill the web part connection



I have a Sharepoint web site and I would like to save it as a template in order to create several site with the same structure and the same web pages.

On some of my web part pages I have some webpart connected to each other (mostly BDC List web part and BDC related list web part). When I save the site as a template and create a new site based on this template most of the connection are not present in the new site. Does anyone know what is the problem and how to solve it? I really need this to work as the site template will contains tens of pages with those connection and we will have to create tens of site with that template so manually recreating the connection is not possible.


Thank you for your help.

Web part connection when there is no value all items appear


Hi All,

i have two lists and two dataview in the same page, i made a connection between the two dataview and every thing work fine,

but i have a little problem: when there is no data in the data view 1 the other data view web part will show all items and that wronge 

it should show nothing,

any ideas ??




Custom List Form web part connection to data view


We have a sharpoint site to manage "projects".    That site includes a document library.  The documents uploaded to the library are categorised based on the project they belong to.

We are trying to implement a custom list form for editing a project record that does one of the following:

1. When the edit form is loaded for a particular projects record that edit form also shows a list of relevant documents.


2. Include a button or link on the edit form to another page that lists only the documents for the current project.

We thought this would be easy to do using web part connections.  If we click on the custom list form it gives us the option to setup a web part connection.  However, if you follow this wizard through and get to the stage of selecting columns to link, there are no columns listed for either the custom list form or for the target dataview.  This is the case whether the target data view is on the same page, ie in case of option 1 or on a different page as in case of option 2.

Could someone advise us how we could either get the web part connections between the custom list form and other dataviews to work or how we could hyperlink to a dataview and pass the id of the record currently being edited to that dataview as a filter?

We are using Sharepoint Designer so would appreciate any suggestions base

Passing a parameter to ReportViewerWebPart through a connection


I have a custom web part that I am trying to use to pass a parameter to the SSRS Report Viewer web part.  I connect my web part to the report viewer web part through the SharePoint Web UI and everything seems connected. However, it seems like the Report Viewer is choosing to ignore it. Here is a simplified sample of what my custom web part is essentially doing:

public class ParameterProviderFeatureWebPart : Microsoft.SharePoint.WebPartPages.WebPart, Microsoft.SharePoint.WebPartPages.IFilterValues
  #region IFilterValues Members

  public string ParameterName 
      return "MarketFilter"; 

  public System.Collections.ObjectModel.ReadOnlyCollection<string> ParameterValues
      System.Collections.Generic.List<string> values = new System.Collections.Generic.List<string>

SSRS Report w/Parameter won't work in web part


Any report without a parameter, I can run directly from a report library, or I can add it in the SSRS web part and it will work perfectly.

If I have a report WITH a parameter, it will run ok directly from the report library, but if I put it in a web part on a Site Page, fill in the date picker parameter, and click apply, the results will not show - - and there's a little Javascript error msg in the lower left corner of IE "Error On Page".

Then, when I double click on that error msg, I see "this_docMapSplitter is null or not an object". I've also gotten other cryptic errors, but that's what consistently shows up now.

any ideas on how to get a web part to work with a parameterized report?

TCP Connection Error with Custom Control Web Part


Hello all,

We have a custom web part based on a user control that queries a database cluster. When the connection to the database is made, we regularly experience the error below and have had to create a work-around in the code to retry the connection.  We have 3 environments - development, staging and production; the error only occurs in production.  The difference in the production environment is it is a farm with 3 WFEs and a SQL cluster, where development and staging are single machine instances.  All are MOSS 2007 & SQL Server 2008.

We cannot find what is causing this issue and I'm hoping someone else has experienced a similar problem and knows the cause.

This is the error that occurs frequently when the query is executed:

System.Data.SqlClient.SqlException: A transport-level error has occurred when sending the request to the server. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)

at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)

at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)

at System.Data.SqlClient.TdsParserStateObject.WriteSni()

at System.Data.SqlClient.TdsParserStateObject.ExecuteFlush()

at System.Data.SqlClient.TdsParser

Error Accessing Oracle Database in a visual web part.


Hello All,

  I'm new to SharePoint development.  I’ve the development box set up with Windows 7 64 bit, share point development environment installed (SharePoint Foundation) with all the hot fixes and I’m able to create and publish a visual webpart and access it. I’ve also installed the 32-bit ODAC (ODAC 11.2 Release 3 ( with Oracle Developer Tools for Visual Studio) and I see the Oracle.DataAccess file in the GAC installed. Here are the results from GAC

C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>gacutil /l Oracle.DataAccess

WPF: If Heineken did MVVM Frameworks Part 4

MVVM is to have an instance of a particular Model (say currentPerson) inside my ViewModel (say PeopleViewModel) which is exposed to the View (say PeopleView). The View binds and edits the Model directly.

This definitely flies in the face of what most people consider to be the holy grail of MVVM pattern, but it's a fairly new pattern, so people are still finding their way with it every day, and this works for me very well. The reason I do what I do, is for the following reasons:

1.I have always had the luxury of being able to write my own UI specific Model classes. I would even do this if I was using some other Model classes first, such as LINQ to SQL or LINQ to Entity Framework. As these classes don't have everything a proper WPF Model class needs in my humble opinion. Though, they are pretty good, as they are Partial classes and use INotifyPropertyChanged/DataContract etc etc
2.I am a pragmatist and I do not like writing code for the sake of writing code. I have seen some MVVM apps where the author has had a Model with 50 properties on it, that are simply repeated in the ViewModel abstraction, where the ViewModel added nothing. On that day I decided I would never do that unless I have to.
3.I honestly see no harm in writing directly to the Model from the View, JUST SO LONG AS if the Model is InValid its data NEVER makes its way to the database. I honestly see no pro

Accessing the different controls inside a GridView control

how we can access a particular control which resides inside a GridView control. In this article I will show you how you can access different controls inside a GridView control. We will see how we can access a TextBox control, a DropDownList control and a ListBox control. If you are working with ASP.NET 1.X then you might want to check out my article Accessing Different Controls Inside a DataGrid.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend