Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Access HtmlControls in code-behind

Reply
Thread Tools

Access HtmlControls in code-behind

 
 
Greg Linwood
Guest
Posts: n/a
 
      12-02-2003
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


 
Reply With Quote
 
 
 
 
Greg Linwood
Guest
Posts: n/a
 
      12-02-2003
OK - thanks - I managed to find that eventually..

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

Regards,
Greg Linwood
SQL Server MVP

"Greg Linwood" <(E-Mail Removed) > wrote in
message news:(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
 
 
 
Bharat
Guest
Posts: n/a
 
      12-02-2003
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
>-----Original Message-----
>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
>
>
>.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Inherit from System.Web.UI.HtmlControls ?? Jill Graham ASP .Net 3 05-10-2004 01:25 AM
Difference between HtmlControls and server controls Gopal Prabhakaran ASP .Net 1 01-26-2004 02:03 PM
Bug: System.Web.UI.HtmlControls.HtmlInputControl - Type = Password Marco Scheel ASP .Net 3 11-26-2003 05:49 AM
HtmlControls doesn't expose GridLayoudPanel? Paul Russell ASP .Net 0 11-03-2003 10:11 AM
System.Web.UI.HtmlControls.HtmlInputFile szabelin ASP .Net 0 08-04-2003 10:21 PM



Advertisments