Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 7 of 7

Thread: passing parameters to xmlpackages

  1. #1
    cdarkloc is offline Member
    Join Date
    Jun 2011
    Posts
    32

    Question passing parameters to xmlpackages

    Hi got a question,

    when I'm referencing an xmlpackage in the template, like this:

    Code:
    <%$ Tokens:XMLPACKAGE, page.xmlpack.xml.config, parameter=value %>
    Is there anyway on earth to make the value dynamic, i.e. a variable of some sort, sort of like parameter=$value ?? does this make sense?

    Please please please I need to make this value dynamic ...

  2. #2
    ROBB is offline Senior Member
    Join Date
    Jun 2011
    Location
    United States
    Posts
    107

    Default Dynamic parameter

    What dynamic value are you trying to pass through?

  3. #3
    cdarkloc is offline Member
    Join Date
    Jun 2011
    Posts
    32

    Default

    Why does that matter? It's a value that is calculated by C# in the codebehind page, and needs to be passed to the xmlpackage if possible.

  4. #4
    BFG 9000 is offline Senior Member
    Join Date
    Oct 2006
    Location
    South UK
    Posts
    882

    Default

    Could the value be calculated within the xmlpackage? or is it available elsewhere? runtime? system? request?

    It's trivial to pass a variable to another xmlpackage from within an xmlpackage.

    C#/VB.NET Code:
    <xsl:value-of select="aspdnsf:XmlPackage('packagename.xml.config', concat('PassedInVariable=', $Variable))" disable-output-escaping="yes" /> 


    TTFN

    BFG

  5. #5
    paulofabiano is offline Junior Member
    Join Date
    Jan 2012
    Posts
    5

    Default

    Is this possible?

    <xsl:value-of select="aspdnsf:XmlPackage('packagename.xml.config ', concat('PassedInVariable=', $Variable))" disable-output-escaping="yes" />

    When I try to load a xmlPackage from other Package, I receive this error:

    Exception=Access to the path 'C:\inetpub\wwwroot\AspDotNetStorefront\Web\images \page.banners.xml.config_store.runtime.xsl' is denied.<br/>

    And my xmlpackage in exactly in the same folder of the other one I using to call mine.

  6. #6
    ROBB is offline Senior Member
    Join Date
    Jun 2011
    Location
    United States
    Posts
    107

    Default Access Denied

    Make sure your images directory grants read and write access to the .NET user account.

    See this article: http://manual.aspdotnetstorefront.co...is-denied.aspx

    The article defines the symptom as a result of trying to upload an image. However, I have also seen it applicable for the scenario you have described.

    Let us know if that resolves the error.

  7. #7
    paulofabiano is offline Junior Member
    Join Date
    Jan 2012
    Posts
    5

    Default

    Hi ROBB,

    The problem was the debug mode set to true, in my xmlpackage file. I changed it to false and it´s running fine now.

    Thanks for the attention.

    Att,
    Paulo