Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET
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 10-Dec-12 1:53am
Rate this: bad
good
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")
  Permalink  
Comments
__TR__ at 10-Dec-12 9:03am
   
+5.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Hi,
 
try this
 
tdDOR.Visible = false;
  Permalink  
Comments
honey4bee at 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)



Advertise | Privacy | Mobile
Web02 | 2.8.140827.1 | Last Updated 10 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

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