SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a custom list that i'm filtering passing parameter from an control. I do have some checkboxlist items, e,g below $priorChk. The problem I have is if I select only one checkbox and filter its does work but not if I select multiple values. I also tried printing out the values and I notice I just get only the first values. How to pass multiple check box values as parameters to the /dsQueryResponse/Rows/Row?

When I test the below i also get error:

Error while executing web part: System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B) at (XmlQueryRuntime , XPathNavigator , Double , Double ) at Root(XmlQueryRuntime ) at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter writer, Boolean closeWriter) at System.Xml.Xsl.XmlILCommand.Execute(IXPathNavigable contextDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter results) at System.Xml.Xsl.XslCompiledTransform.Transform(IXPathNavigable input, XsltArgumentList arguments, XmlWriter results) at Microsoft.SharePoint.WebPartPages.DataFormWebPart.ExecuteTransform(XslCompiledTransform xslCompiledTransform, XsltArgumentList xmlArguments, Boolean bDeferExecuteTransform) at Microsoft.SharePoint.WebPartPages.DataFormWebPart.PrepareAndPerformTransform(Boolean bDeferExecuteTransform)

ASP.Net control:

 <ParameterBinding Name="priorChk" Location="Control(priorityChk)" DefaultValue=""/>
        <asp:CheckBoxList runat="server" id="priorityChk" Width="179px">
        <asp:ListItem>Effective Immediately</asp:ListItem>
        <asp:ListItem>Action Required</asp:ListItem>
        <asp:ListItem>Key Changes</asp:ListItem>

<xsl:variable name="Rows" select="/dsQueryResponse/Rows/Row[(number(ddwrt:FormatDateTime(ddwrt:FormatDate(string(@Created),1033,1),1033,'yyyyMMdd'))&gt;=number(ddwrt:FormatDateTime(ddwrt:FormatDate(string($sdate),1033,1),1033,'yyyyMMdd'))) and (number(ddwrt:FormatDateTime(ddwrt:FormatDate(string(@Created),1033,1),1033,'yyyyMMdd')) &lt;= number(ddwrt:FormatDateTime(ddwrt:FormatDate(string($edate),1033,1),1033,'yyyyMMdd'))) or (number(ddwrt:FormatDateTime(ddwrt:FormatDate(string(@Effective_x0020_Date),1033,1),1033,'yyyyMMdd'))) =
(number(ddwrt:FormatDateTime(ddwrt:FormatDate(string($effectDate),1033,1),1033,'yyyyMMdd'))) or ($title != '' and contains(@Title,string($title))) or ($priorChk != '' and  contains(@Priority,string($priorChk)))]"/>
share|improve this question
Can anyone help? – naijacoder Sep 4 '11 at 12:25

Error while executing web part: System.BadImageFormatException: An attempt was made to load a program with an incorrect format

this usually means you are trying to use a sharepoint dll (x64) x86 program? Your assemblies should all have the build type set to "Any CPU".

If this is not the case, sharepoint will return some really weird errors..

share|improve this answer

Have you tried creating multiple variables and then passing the variables into your xpath to filter on?

share|improve this answer
While your answer may answer the question it lacks extra content and is more suited as a comment, please refer to the FAQ[1] for more information on how to post here. [1]: – Hugh Wood Nov 30 '12 at 14:30

Your Answer


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.