Click here to Skip to main content
14,539,690 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hi.. How to id my below td by programatically, not using java script function..


<td align="right" id="tdDOR" runat="server">
    DOR
</td>




I searched in google also but I didn't get the right solution..

Thanks & Regards,
Honey........
Posted
Updated 27-Jun-19 0:46am
v2
Rate this:
Please Sign up or sign in to vote.

Solution 2

Since you have the TD available on server, by setting runat="server" and do not want to use Javascript, on the Page_Load event access the td by its ID and set it visible = false i.e.,

tdDOR.visible = false


or
You can set its style as well in HTML itself

<td align="right" id="tdDOR" runat="server" style="display:none">
  DOR
</td>


or
You can set this style in code behind as well on Page_Load event
tdDOR.attributes.add("style","display:none")



Or
You can use another style,
tdDOR.attributes.add("style","visibility:hidden")
   
Comments
__TR__ 10-Dec-12 9:03am
   
+5.
Rate this:
Please Sign up or sign in to vote.

Solution 1

Hi,

try this

tdDOR.Visible = false;
   
Comments
honey4bee 10-Dec-12 8:05am
   
k ... resoved for ur above line of code... thank u........

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




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100