0

If i use the following markup for my ListView it will ignore the css properties on the div. What is it i don't get here ?

<ItemTemplate>
    <tr>
        <td><%# Eval("RowNumber")%></td>
        <td><%# Eval("Desc")%></td>
    </tr>
    <div style="display: none; visibility: hidden">
        <tr>
            <td><%# Eval("RowNumber")%></td>
            <td><%# Eval("Desc")%></td>
        </tr>
    </div>
</ItemTemplate>
</asp:ListView>

1 Answer 1

4

Why not just do:

<ItemTemplate>
    <tr>
        <td><%# Eval("RowNumber")%></td>
        <td><%# Eval("Desc")%></td>
    </tr>
    <tr style="display: none;">
        <td><%# Eval("RowNumber")%></td>
        <td><%# Eval("Desc")%></td>
    </tr>
</ItemTemplate>
</asp:ListView>
Sign up to request clarification or add additional context in comments.

2 Comments

Alex is correct, but the reason is your HTML is invalid. You cannot wrap a TR in a DIV.
Thanks for completing with the reason.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.