扩展对象'urn:aspdnsf'不包含匹配的'getCampaignData'方法 [英] Extension object 'urn:aspdnsf' does not contain a matching 'getCampaignData' method

查看:99
本文介绍了扩展对象'urn:aspdnsf'不包含匹配的'getCampaignData'方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



在一个文件中(somethingName.xml.congif)我添加此代码 - xsl模板



在thop < br $>


Hi,
in one file (somethingName.xml.congif) i add this code - xsl template

at the thop

<query name="Product" rowElementName="ProductInCampaign" runif="showproduct">
  <sql>
    <![CDATA[
    exec dbo.aspdnsf_getCampaignData @ProductID

  </sql>
  <queryparam paramname="@ProductID"       paramtype="request" requestparamname="ProductID"       sqlDataType="int" defvalue="0"  validationpattern="^\d{1,10}$" />
</query>



然后


then

<xsl:template name="ProductInCampaignID">
  <xsl:param name="CampaignID" select="aspdnsf:_getCampaignData(ProductID)"></xsl:param>
  <div class="CampId">
    <xsl:value-of select="$CampaignID" />
  </div>
</xsl:template>





然后我叫这个模板



and then i call this template

<xsl:call-template name="ProductInCampaignID"></xsl:call-template>





在MS SQL数据库中我有这个程序



In MS SQL database i have this procedure

ALTER PROCEDURE [dbo].[aspdnsf_getCampaignData]
	@ProductID int
AS
BEGIN
	SET NOCOUNT ON;

	SELECT FK_Campaign FROM ProductInCampaign WHERE FK_Product=@ProductID
END





当我运行我的项目时,我得到了这个例外



When i run my project, i get this exception

XmlPackage Exception: Exception=Last Trace Point=[]. Extension object 'urn:aspdnsf' does not contain a matching 'getCampaignData' method that has 1 parameter(s).


System.ArgumentException: Last Trace Point=[]. Extension object 'urn:aspdnsf' does not contain a matching 'getCampaignData' method that has 1 parameter(s).

at AspDotNetStorefrontCommon.XmlPackage2.TransformString() at AspDotNetStorefrontCommon.AppLogic.RunXmlPackage(XmlPackage2 p, Parser UseParser, Customer ThisCustomer, Int32 SkinID, Boolean ReplaceTokens, Boolean WriteExceptionMessage)





有没有我应该定义此程序的文件?或者去其他地方寻找其他问题?谢谢



Is there any file where i was supposed to define this procedure? Or go here for some other problem? Thanks

推荐答案

/ >
< / query >
" /> </query>



then


then

<xsl:template name="ProductInCampaignID">
  <xsl:param name="CampaignID" select="aspdnsf:_getCampaignData(ProductID)"></xsl:param>
  <div class="CampId">
    <xsl:value-of select="


CampaignID />
< / div >
< / xsl:template >
CampaignID" /> </div> </xsl:template>





然后我叫这个模板



and then i call this template

<xsl:call-template name="ProductInCampaignID"></xsl:call-template>





在MS SQL数据库中我有这个程序



In MS SQL database i have this procedure

ALTER PROCEDURE [dbo].[aspdnsf_getCampaignData]
	@ProductID int
AS
BEGIN
	SET NOCOUNT ON;

	SELECT FK_Campaign FROM ProductInCampaign WHERE FK_Product=@ProductID
END





当我运行我的项目时,我得到了这个例外



When i run my project, i get this exception

XmlPackage Exception: Exception=Last Trace Point=[]. Extension object 'urn:aspdnsf' does not contain a matching 'getCampaignData' method that has 1 parameter(s).


System.ArgumentException: Last Trace Point=[]. Extension object 'urn:aspdnsf' does not contain a matching 'getCampaignData' method that has 1 parameter(s).

at AspDotNetStorefrontCommon.XmlPackage2.TransformString() at AspDotNetStorefrontCommon.AppLogic.RunXmlPackage(XmlPackage2 p, Parser UseParser, Customer ThisCustomer, Int32 SkinID, Boolean ReplaceTokens, Boolean WriteExceptionMessage)





有没有我应该定义此程序的文件?或者去其他地方寻找其他问题?谢谢



Is there any file where i was supposed to define this procedure? Or go here for some other problem? Thanks


此问题已解决。在顶部有必要添加查询,例如这个

This problem is solved. At the top it is necessary to add query, like this
<query name="Product" rowelementname="ProductInCampaign" runif="showproduct">
    <sql>
      <![CDATA[

      exec dbo.aspdnsf_getCampaignData @ProductID

      ]]>
    </sql>
    <queryparam paramname="@ProductID" paramtype="request" requestparamname="ProductID" sqldatatype="int" defvalue="0" validationpattern="" />
  </query>





然后是xsl模板



then xsl template

<xsl:template name="ProductInCampaignID" xmlns:xsl="#unknown">
  <xsl:for-each select="/root/Product/ProductInCampaign">

    <div class="CampId">
      <xsl:value-of select="FK_Campaign" />
      <p>fdsfas</p>
    </div>
  </xsl:for-each>
</xsl:template>





并调用此模板



and call this template

<xsl:call-template name="ProductInCampaignID" xmlns:xsl="#unknown"></xsl:call-template>





感谢您的帮助会员10272815:)



Thanks for the help Member 10272815 :)


这篇关于扩展对象'urn:aspdnsf'不包含匹配的'getCampaignData'方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆