Click here to Skip to main content
15,895,011 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Coders,
I had got an problem, I have to hide certain columns of a table during run-time on basis of some conditions.
Thanks in advance !

Example as follows:
XML
<b>Testpage.aspx</b>
<table>
  <tr>
    <td id = "one"> Hello</td>
  </tr>
</table>

On page load event I want to hide this <td> on some conditions.
Posted
Updated 16-Feb-12 0:59am
v5
Comments
André Kraak 16-Feb-12 7:00am    
Edited question:
"Treat my content as plain text..." option disabled.
Added pre tags

1 solution

Refer following code.

XML
<b>Testpage.aspx</b>
<table>
  <tr>
<![CDATA[<%
     if (Convert.ToInt32(Session["usertype"]) != 1)
     { 
          %>]]>
    <td id = "one"> Hello</td>
<![CDATA[<%}%>]]>
  </tr>
</table>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900