Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > possible to manipulate pure HTML controls from code-behind?

Reply
Thread Tools

possible to manipulate pure HTML controls from code-behind?

 
 
Jeff
Guest
Posts: n/a
 
      11-02-2003
Can I manipulate the properties of pure HTML controls (i.e. not server side
controls) from my aspx.cs Page_Load event? If so, I don't see the control
listed by intellisense. I gave the control a unique ID to boot. Is what
I'm trying impossible unless you are using a server side control?

Thanks


 
Reply With Quote
 
 
 
 
S Gopikrishna
Guest
Posts: n/a
 
      11-02-2003
Hi

You have to use the RUNAT = "SERVER" attribute for the
controls to be accessed from Server side.

The following link will be helpful to you in understandin
g the difference between HTML Controls and Server Con
trols. Note that both these controls require RUNAT
= "SERVER" for accessing them from Server side

-Gopi

>-----Original Message-----
>Can I manipulate the properties of pure HTML controls

(i.e. not server side
>controls) from my aspx.cs Page_Load event? If so, I

don't see the control
>listed by intellisense. I gave the control a unique ID

to boot. Is what
>I'm trying impossible unless you are using a server side

control?
>
>Thanks
>
>
>.
>

 
Reply With Quote
 
 
 
 
Giorgio Parmeggiani
Guest
Posts: n/a
 
      11-02-2003
Hi

I think you can't manipulate HTML control unless are server-side control
(runat = server)

If your HTM pure controls contain the runat=server attribute you can find
the control in the "System.Web.UI.HtmlControls" namespace therefore in the
Page_Load event:

protected System.Web.UI.HtmlControls.HtmlInputButton button2;

private void Page_Load(object sender, System.EventArgs e)
{
button2.Value = "Go";
}

Ciao
Giorgio

"Jeff" <(E-Mail Removed)> ha scritto nel messaggio
news:3fa55519$(E-Mail Removed)...
> Can I manipulate the properties of pure HTML controls (i.e. not server

side
> controls) from my aspx.cs Page_Load event? If so, I don't see the control
> listed by intellisense. I gave the control a unique ID to boot. Is what
> I'm trying impossible unless you are using a server side control?
>
> Thanks
>
>



 
Reply With Quote
 
Bucko
Guest
Posts: n/a
 
      11-02-2003
Keep in mind also you can use the generic html control for things such
as <body> tags. (if you wanted to programmatically change body tag
attributes)

Giorgio Parmeggiani wrote:

> Hi
>
> I think you can't manipulate HTML control unless are server-side control
> (runat = server)
>
> If your HTM pure controls contain the runat=server attribute you can find
> the control in the "System.Web.UI.HtmlControls" namespace therefore in the
> Page_Load event:
>
> protected System.Web.UI.HtmlControls.HtmlInputButton button2;
>
> private void Page_Load(object sender, System.EventArgs e)
> {
> button2.Value = "Go";
> }
>
> Ciao
> Giorgio
>
> "Jeff" <(E-Mail Removed)> ha scritto nel messaggio
> news:3fa55519$(E-Mail Removed)...
>
>>Can I manipulate the properties of pure HTML controls (i.e. not server
>>

> side
>
>>controls) from my aspx.cs Page_Load event? If so, I don't see the control
>>listed by intellisense. I gave the control a unique ID to boot. Is what
>>I'm trying impossible unless you are using a server side control?
>>
>>Thanks
>>
>>
>>

>
>


 
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
Pure space directly inside div ignored, but pure space directlyinside span honored liketofindoutwhy@gmail.com HTML 4 03-29-2008 06:06 PM
Is it possible to get (and manipulate) this value? laredotornado@zipmail.com Javascript 2 02-13-2007 01:48 AM
Pure functions still pure after definition Todd Aspeotis C++ 3 05-30-2005 03:53 AM
To manipulate or not to manipulate Dave C++ 1 01-22-2005 10:52 PM
possible to manipulate pure HTML controls from code-behind? mike_bluestein@ya_StopSpammingMe_hoo.com ASP .Net Web Controls 0 11-03-2003 09:59 PM



Advertisments