473,387 Members | 1,619 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

possible to manipulate pure HTML controls from code-behind?

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
Nov 15 '05 #1
2 2232
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" <ex****@exc.dom> ha scritto nel messaggio
news:3f**********@newspeer2.tds.net...
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

Nov 15 '05 #2
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" <ex****@exc.dom> ha scritto nel messaggio
news:3f**********@newspeer2.tds.net...
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



Nov 15 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Tobias Nilsson | last post by:
I have almost exactly the same problem as the guy below. Is it NOT possible running .NET code locally in Internet Explorer WITHOUT a webserver???? / Tobias --------- My company has in the...
1
by: Nic | last post by:
Hi - I am battling to find the a resource, so maybe some one in here can help The problem is as follows: I am trying to build a mod_perl source code editor for the web - to edit Perl source code...
9
by: Edward Diener | last post by:
I received no answers about this the first time I posted, so I will try again. My inability to decipher an MSDN topic may find others who have the same inability and someone who can decipher and...
6
by: Zingam | last post by:
Is it possible to insert a WinForm in a WebForm? I'd like for example to insert a managed directx viewer in a webform, that would display 3d graphics on the form? Is this possible? Regards,...
2
by: Olivier Matrot | last post by:
Hello, I'm looking for a tool that is able to manipulate aspx source files (specifically <asp:datagrid> ) out of Visual Studio. The goal is to give aspx file to a web designer in order for him...
2
by: Mark | last post by:
Hi, I am wanting to know if it is possible to embed a UserControl into a Page at runtime. What I am trying to do is allow a user to specify that they want a "contact form" or a "latest news" in...
8
by: Daniel | last post by:
Hi, Does anyone know if it is possible to put an aspx page inside of another? OR run an aspx page and capture the output as a string and then write this out to a page.... So for example say...
21
by: sks | last post by:
Hi , could anyone explain me why definition to a pure virtual function is allowed ?
0
by: Ken Fine | last post by:
This supplements a question I asked earlier, about acting on ASP.NET controls of a particular type. I'm wondering how to loop through all controls on a page and manipulate user controls with...
1
by: C. (http://symcbean.blogspot.com/) | last post by:
On Aug 12, 7:08 am, long_way <yilongwei....@gmail.comwrote: Hi, Wouldn't it just be simpler to use Google maps? I'm not overly familiar with greybox, but it should be fairly straightforward...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.