2009-09-10

How to refer to a HTML control from C#.net code

Lets take the HTML code snippet as follows

Ex:-<table id="tbData" runat="server">

Then we can refer to that table from C#.net code by calling the follwing code

HtmlTable htable = (HtmlTable)Page.FindControl("tbData");

No comments: