473,378 Members | 1,422 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,378 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 17 '05 #1
3 1273
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 sidecontrols) from my aspx.cs Page_Load event? If so, I don't see the controllisted by intellisense. I gave the control a unique ID to boot. Is whatI'm trying impossible unless you are using a server side control?
Thanks
.

Nov 17 '05 #2
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 17 '05 #3
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 17 '05 #4

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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.