<xmod:Redirect>

The Redirect tag is a great way to extend XMod Pro's ability to interact with other applications and services. Its sole purpose is to send data to other URL's. You tell it which data to send by adding <field> tags. At run-time, it renders as a hyperlink, a push-button, or a clickable image (depending on its settings) and, when clicked will send the information it finds in the <field> tags to URL you specify. Data can be sent via HTTP POST (the same method used when you click the Submit button on a standard web form) or HTTP GET (which passes your data as parameters in the URL).

Syntax

<xmod:Redirect
    Display="button|linkbutton|imagebutton"
    ImageUrl="url"
    ImageAlign="absbotom|absmiddle|baseline|bottom|left|middle|right|texttop|top"
    Method="get|post"
    OnClientClick="javascript"
    Style="string"
    Target="url"
    Text="string"
    ToolTip="string"
    Visible="True|False"
    Width="size">
 

    <Field Name="string" Value="string" />
additional fields as needed ...

</xmod:Redirect>

Remarks

Back to top

Example

<div>
  <table width="100%">
    <tr>
      <td colspan="2">
        <!-- DEPARTMENTS TEMPLATE -->
        <xmod:template id="Departments">
          <listdatasource commandtext="SELECT ProductId, ProductName FROM XMPDemo_Products ORDER BY ProductName" />
          <itemtemplate>
            <xmod:redirect text="Purchase" target="http://mysite.com/purchase.aspx">
              <field name="pid" value='[[ProductId]]' />
            </xmod:redirect>
          </itemtemplate>
        </xmod:template>
      </td>
    </tr>
  </table>
</div>
 
Back to top