Access HtmlControls in code-behind

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
 
G

Greg Linwood

OK - thanks - I managed to find that eventually..

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

Regards,
Greg Linwood
SQL Server MVP
 
B

Bharat

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top