<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" > <channel><title>Comments on: Hiding a Row in ASP.NET</title> <atom:link href="http://scottelkin.com/programming/csharp/hiding-a-row-in-aspnet/feed/" rel="self" type="application/rss+xml" /><link>http://scottelkin.com/programming/csharp/hiding-a-row-in-aspnet/</link> <description>Tech, Love, Life</description> <lastBuildDate>Thu, 11 Aug 2011 02:51:22 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>By: Naeem</title><link>http://scottelkin.com/programming/csharp/hiding-a-row-in-aspnet/comment-page-1/#comment-64738</link> <dc:creator>Naeem</dc:creator> <pubDate>Fri, 17 Jun 2011 12:00:35 +0000</pubDate> <guid isPermaLink="false">/archive/2005/04/14/Hiding-a-Row-in-ASP.NET.aspx#comment-64738</guid> <description>its very helpful thanks!</description> <content:encoded><![CDATA[<p>its very helpful thanks!</p> ]]></content:encoded> </item> <item><title>By: Ankit Kumar Chauhan</title><link>http://scottelkin.com/programming/csharp/hiding-a-row-in-aspnet/comment-page-1/#comment-64732</link> <dc:creator>Ankit Kumar Chauhan</dc:creator> <pubDate>Fri, 17 Jun 2011 11:34:44 +0000</pubDate> <guid isPermaLink="false">/archive/2005/04/14/Hiding-a-Row-in-ASP.NET.aspx#comment-64732</guid> <description>thankyou sir</description> <content:encoded><![CDATA[<p>thankyou sir</p> ]]></content:encoded> </item> <item><title>By: Eric</title><link>http://scottelkin.com/programming/csharp/hiding-a-row-in-aspnet/comment-page-1/#comment-46835</link> <dc:creator>Eric</dc:creator> <pubDate>Thu, 10 Feb 2011 17:10:58 +0000</pubDate> <guid isPermaLink="false">/archive/2005/04/14/Hiding-a-Row-in-ASP.NET.aspx#comment-46835</guid> <description>Mike, thank you for that, tbody is actually a much cleaner solution for any rows beyond one or two.Again, thank you very much!</description> <content:encoded><![CDATA[<p>Mike, thank you for that, tbody is actually a much cleaner solution for any rows beyond one or two.</p><p>Again, thank you very much!</p> ]]></content:encoded> </item> <item><title>By: Mike</title><link>http://scottelkin.com/programming/csharp/hiding-a-row-in-aspnet/comment-page-1/#comment-16646</link> <dc:creator>Mike</dc:creator> <pubDate>Mon, 12 Jul 2010 18:24:02 +0000</pubDate> <guid isPermaLink="false">/archive/2005/04/14/Hiding-a-Row-in-ASP.NET.aspx#comment-16646</guid> <description>Thanks for this information Scott.For anyone interested, you can also achieve the same for multiple TR tags by adding a TBODY tag to wrap the rows, and then giving it an ID and runat=server attribute.You can have as many TBODY&#039;s in a table as you like, so you can use them just like asp:PANEL tags.</description> <content:encoded><![CDATA[<p>Thanks for this information Scott.</p><p>For anyone interested, you can also achieve the same for multiple TR tags by adding a TBODY tag to wrap the rows, and then giving it an ID and runat=server attribute.</p><p>You can have as many TBODY&#8217;s in a table as you like, so you can use them just like asp:PANEL tags.</p> ]]></content:encoded> </item> <item><title>By: stefan</title><link>http://scottelkin.com/programming/csharp/hiding-a-row-in-aspnet/comment-page-1/#comment-12179</link> <dc:creator>stefan</dc:creator> <pubDate>Thu, 11 Feb 2010 07:23:24 +0000</pubDate> <guid isPermaLink="false">/archive/2005/04/14/Hiding-a-Row-in-ASP.NET.aspx#comment-12179</guid> <description>Brilliant idea! Thanks for sharing!!</description> <content:encoded><![CDATA[<p>Brilliant idea! Thanks for sharing!!</p> ]]></content:encoded> </item> <item><title>By: mako</title><link>http://scottelkin.com/programming/csharp/hiding-a-row-in-aspnet/comment-page-1/#comment-11492</link> <dc:creator>mako</dc:creator> <pubDate>Thu, 14 Jan 2010 20:13:54 +0000</pubDate> <guid isPermaLink="false">/archive/2005/04/14/Hiding-a-Row-in-ASP.NET.aspx#comment-11492</guid> <description>Thanks a lot!Like another poster mentioned i also forgot the runat=server part.</description> <content:encoded><![CDATA[<p>Thanks a lot!</p><p>Like another poster mentioned i also forgot the runat=server part.</p> ]]></content:encoded> </item> <item><title>By: http://</title><link>http://scottelkin.com/programming/csharp/hiding-a-row-in-aspnet/comment-page-1/#comment-188</link> <dc:creator>http://</dc:creator> <pubDate>Thu, 02 Feb 2006 14:26:00 +0000</pubDate> <guid isPermaLink="false">/archive/2005/04/14/Hiding-a-Row-in-ASP.NET.aspx#comment-188</guid> <description>I just happened upon this thread today and the solution appears to be exactly what I need to implement role-based access for specified db fields on a FormView (admittedly a quick &amp; dirty version). &lt;br&gt; &lt;br&gt;However, upon implementation &amp; execution the page threw and exception: &lt;br&gt; &lt;br&gt;System.NullReferenceException was unhandled by user code &lt;br&gt;  Message=&quot;Object reference not set to an instance of an object.&quot; &lt;br&gt;  Source=&quot;App_Web_-yigdorv&quot; &lt;br&gt;  StackTrace: &lt;br&gt;       at EditProperty.Page_Load(Object sender, EventArgs e) in c:\Inetpub\wwwroot\trump\EditProperty.aspx.cs:line 31 &lt;br&gt;... &lt;br&gt; &lt;br&gt;My code in aspx page: &lt;br&gt; &lt;br&gt;&lt;tr runat=&quot;server&quot; id=&quot;trMP_Latitude&quot;&gt; &lt;br&gt; &lt;br&gt;My code in aspx.cs page: &lt;br&gt; &lt;br&gt;public partial class EditProperty : System.Web.UI.Page &lt;br&gt;{ &lt;br&gt;    protected HtmlTableRow trMP_Latitude; &lt;br&gt; &lt;br&gt;    protected void Page_Load(object sender, EventArgs e) &lt;br&gt;    { &lt;br&gt;        if (!Page.IsPostBack) {                                             // first-time logic &lt;br&gt;            trMP_Latitude.Visible = false;    &lt;=== THROWS EXCEPTION &lt;br&gt;... &lt;br&gt; &lt;br&gt;No doubt the problem stems from the fact that the table is contained within a FormView inside a ContentPageHolder which, in turn, is contained within the master page.  I will mess around with the FindControl() method until I figure out the necessary syntax (hopefully ASP.Net 3.0 will enable a cleaner syntax for finding a buried control). &lt;br&gt; &lt;br&gt;Troy</description> <content:encoded><![CDATA[<p>I just happened upon this thread today and the solution appears to be exactly what I need to implement role-based access for specified db fields on a FormView (admittedly a quick &#038; dirty version).</p><p>However, upon implementation &#038; execution the page threw and exception:</p><p>System.NullReferenceException was unhandled by user code<br /> <br /> Message=&#8221;Object reference not set to an instance of an object.&#8221;<br /> <br /> Source=&#8221;App_Web_-yigdorv&#8221;<br /> <br /> StackTrace:<br /> <br /> at EditProperty.Page_Load(Object sender, EventArgs e) in c:\Inetpub\wwwroot\trump\EditProperty.aspx.cs:line 31<br /> <br />&#8230;</p><p>My code in aspx page:</p><tr runat="server" id="trMP_Latitude"><p>My code in aspx.cs page:</p><p>public partial class EditProperty : System.Web.UI.Page<br /> <br />{<br /> <br /> protected HtmlTableRow trMP_Latitude;</p><p> protected void Page_Load(object sender, EventArgs e)<br /> <br /> {<br /> <br /> if (!Page.IsPostBack) {                                             // first-time logic<br /> <br /> trMP_Latitude.Visible = false; < === THROWS EXCEPTION<br /> <br />&#8230;</p><p>No doubt the problem stems from the fact that the table is contained within a FormView inside a ContentPageHolder which, in turn, is contained within the master page.  I will mess around with the FindControl() method until I figure out the necessary syntax (hopefully ASP.Net 3.0 will enable a cleaner syntax for finding a buried control).</p><p>Troy</tr> ]]></content:encoded> </item> <item><title>By: http://</title><link>http://scottelkin.com/programming/csharp/hiding-a-row-in-aspnet/comment-page-1/#comment-187</link> <dc:creator>http://</dc:creator> <pubDate>Fri, 07 Oct 2005 14:03:00 +0000</pubDate> <guid isPermaLink="false">/archive/2005/04/14/Hiding-a-Row-in-ASP.NET.aspx#comment-187</guid> <description>Great! Thanks very much &lt;br&gt;Also thanks to &quot;Skip&quot; for mentioning &quot;run at server&quot; &lt;br&gt;</description> <content:encoded><![CDATA[<p>Great! Thanks very much<br /> <br />Also thanks to &#8220;Skip&#8221; for mentioning &#8220;run at server&#8221;<br /></p> ]]></content:encoded> </item> <item><title>By: http://</title><link>http://scottelkin.com/programming/csharp/hiding-a-row-in-aspnet/comment-page-1/#comment-186</link> <dc:creator>http://</dc:creator> <pubDate>Tue, 27 Sep 2005 19:52:00 +0000</pubDate> <guid isPermaLink="false">/archive/2005/04/14/Hiding-a-Row-in-ASP.NET.aspx#comment-186</guid> <description>One clarification... &lt;br&gt; &lt;br&gt;&quot;The reason this has gone unnoticed by many developers is that they are developing for Internet Explorer exclusively, which will forgive some of these mistakes&quot; &lt;br&gt; &lt;br&gt;Although IE is very forgiving, and that often makes this statement true, for Panels, the Framework generates DIVS in IE vs TABLES in other browsers.</description> <content:encoded><![CDATA[<p>One clarification&#8230;</p><p>&#8220;The reason this has gone unnoticed by many developers is that they are developing for Internet Explorer exclusively, which will forgive some of these mistakes&#8221;</p><p>Although IE is very forgiving, and that often makes this statement true, for Panels, the Framework generates DIVS in IE vs TABLES in other browsers.</p> ]]></content:encoded> </item> <item><title>By: http://</title><link>http://scottelkin.com/programming/csharp/hiding-a-row-in-aspnet/comment-page-1/#comment-185</link> <dc:creator>http://</dc:creator> <pubDate>Tue, 05 Jul 2005 21:22:00 +0000</pubDate> <guid isPermaLink="false">/archive/2005/04/14/Hiding-a-Row-in-ASP.NET.aspx#comment-185</guid> <description>I&#039;d already figured out that assigning an ID to the table row would allow me to hide or show the row.  Sadly forgot the runat=server bit.  Your post saved my hair.  Cheers,</description> <content:encoded><![CDATA[<p>I&#8217;d already figured out that assigning an ID to the table row would allow me to hide or show the row.  Sadly forgot the runat=server bit.  Your post saved my hair.  Cheers,</p> ]]></content:encoded> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced)

Served from: scottelkin.com @ 2012-02-09 10:42:42 -->
