views:

52

answers:

1

Is something like this possible?

<asp:FormView ID="myFormView" runat="server">
    <ItemTemplate>
        <p><%# XPath("Root/Path/Item[@id=<%=this.m_myId%>]/HelloWorld")%></p>
    </ItemTemplate>
</asp:FormView>

m_myId is a member variable on the page. I can't seem to get it to work without a parsing error.

+3  A: 

You can't have nested asp tags. Try something like this:

<%# XPath("Root/Path/Item[@id= " + this.m_myId + "]/HelloWorld") %>
womp