Access HtmlControls in code-behind

  • Thread starter Thread starter Greg Linwood
  • Start date Start date
G

Greg Linwood

How does one access HTML elements from code-behind?

I've got a mix of asp:Labels & <font> elements - I'd like to continue using
<font> elements, but be able to access them from code-behind to set
properties such as InnerHTML, InnerText etc..

Is this possible?

Regards,
Greg Linwood
SQL Server MVP
 
OK - thanks - I managed to find that eventually..

Me.[control name].InnerHTML... so easy!

Regards,
Greg Linwood
SQL Server MVP
 
Hi,

If you say run at server in the HTML tag you can access
that control in your code-behind file. But not all the
HTML tag can be accessed for the list of supported HTML
control you can class in the System.Web.UI.HtmlControls
namespace.

HTH,
Thanks
Bharat Kumar Agrawal
 
Back
Top