Concatenate Strings in Knockout

Viewed 40882

I need to concatenate a url parameter onto an anchor tag. How would I go about insert it into the following template?

        <tbody data-bind="foreach: Customers">
            <tr class="rowEven">
                <td data-bind="text: Name"></td>
                <td data-bind="text: CustomerType"></td>
                <td><a href="customers.aspx?customer=[CustomerAccountIDHere]">Manage</a><a href="#">Guest Admin</a></td>
            </tr>
        </tbody>

I tried this will no luck:

            <tr class="rowEven">
                <td data-bind="text: Name"></td>
                <td data-bind="text: CustomerType"></td>
                <td><a data-bind="attr: { href: 'customers.aspx?customer=' + CustomerAccount_BID}">Manage</a><a href="#">Guest Admin</a></td>
            </tr>
3 Answers
Related