locked
How to pass a parameter to NewForm.aspx via Query string RRS feed

  • Question

  • I change "Add new Item" link. I need to insert parameter into querystring. 

    I try to modify xsl code in SPD:

    My parameter:

    <ParameterBinding Name="Uid" Location="QueryString(Uid)" DefaultValue=""/>

    What I tried to do:

    <xsl:variable name="Url">
       <xsl:value-of select="$ENCODED_FORM_NEW"/>&amp;Uid=<xsl:value-of select="$Uid"/>
      </xsl:variable>
    
    <a class="ms-addnew" id="{$ID}-{$WPQ}"
    href="{$Url}"
    onclick="javascript:NewItem2(event, &quot;{$Url}&quot;);javascript:return false;"
    target="_self">
    <xsl:value-of select="$AddNewText" />
    </a>
    
    

    and

    <xsl:variable name="Url">
    <xsl:value-of select="$ENCODED_FORM_NEW"/>
    </xsl:variable>
    <a class="ms-addnew" 
    id="{$ID}-{$WPQ}" 
    href="{$Url}&amp;Uid={$Uid}" onclick="javascript:NewItem2(event, &quot;{$Url}&amp;Uid={$Uid}&quot;);javascript:return false;" 
    target="_self">
    <xsl:value-of select="$AddNewText" />
    </a>
    

    In both variants I have correct Url link with Uid in the end. But when i go to the link, there is no Uid in Url. 

    How could I get over this problem?

    Sharepoint 2010, SPD 2010

    Thanks

    Monday, February 4, 2013 4:03 PM