Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a scenario where from Visual Web Part I need to send filter parameter to XSLTListView or DataForm Web Part on the same page! If I use Query String then I need to Response.Redirect and that will flush the values of other controls on the page!

So don't need to use Query String, is there any other method to transfer parameter/value to List View?

I have tried making Parameter from Control and defined the control in Visual Web Part with static Id and used as a filter for List View but that doesn't work! Is there any possibility that I can get XSLTListViewWebPart using GetLimitedWebPartManager for the page and pass set Parameter values?

share|improve this question

1 Answer 1

Don't know much about it but did you tried

XsltListViewWebPart lvwpOrganisation = mgrPageManager.WebParts[idWebPartRootOrganisation] as XsltListViewWebPart;

and then create a custom view like,

 SPView oCustomView = organisations.Views[SponsoringCommon.Constants.VIEWS_ORGANISATION_DASHBOARD_NAME];

Source : http://stackoverflow.com/questions/12280376/show-add-new-item-on-xsltlistviewwebpart-programatically

Hope it helps :)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.