473,403 Members | 2,323 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,403 software developers and data experts.

getElementByID on the server side

hey all,
is there a way to say getElementById on the server side or is setting the
html control as runat="server" the way to go?

i'm just trying to get to a div and add controls to it.

thanks,
rodchar
Oct 23 '07 #1
2 3467
"rodchar" <ro*****@discussions.microsoft.comwrote in message
news:FB**********************************@microsof t.com...
is there a way to say getElementById on the server side or is setting the
html control as runat="server" the way to go?
The only way a control can be handled server-side is if it actually runs
server-side - as you say, runat="server" is the way to go...
i'm just trying to get to a div and add controls to it.
If you use an <asp:Panel>, that will render as a <divanyway...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Oct 23 '07 #2
rodchar wrote:
hey all,
is there a way to say getElementById on the server side or is setting the
html control as runat="server" the way to go?

i'm just trying to get to a div and add controls to it.

thanks,
rodchar
Everything in the markup code is handled as server controls. The html
code that doesn't have runat="server" is handled as text in
LiteralControl controls.

You could theoritically look for the element in the literal controls of
the page, but that's not practical. Put runat="server" in the div so
that it becomes a server control in itself, or put a PlaceHolder inside
the div to add the controls in.

--
Göran Andersson
_____
http://www.guffa.com
Oct 23 '07 #3

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

Similar topics

2
by: Chris | last post by:
Hi, I'm having a problem utilizing the DOM. I tried using my own code, but it wasn't working, so I tried to use code straight from another web site and it verified that the problem may not be...
4
by: Michael Hill | last post by:
I have this tag: <span id="member_id"></span> and I want to change the value to "Member" why can't I do: document.getElementByID("member_id").value = "Member";
1
by: Andre Ranieri | last post by:
Hello, I'm trying to set up an ASP.NET 2.0 form where the user enters values in WebControls.TextBoxes for amount owing, interest and late fees and a JavaScript function totals the three values...
4
by: Beemer Biker | last post by:
I am adding at bindtime an htmlbutton and an html dropdownlist. The idea is to select the item in the list, hit the button and my callback code uses the ID.selectedindex to act on the item that...
6
by: Winston | last post by:
I want to changue the stylesheet for this page. Why the form select doesn't work? link id="est" rel="stylesheet" type="text/css" href="est.css"> function Changue() {
4
by: Claudio Calboni | last post by:
Hello folks, I'm having some performance issues with the client-side part of my application. Basically, it renders a huge HTML table (about 20'000 cells in my testing scenario), without content....
4
by: Rob | last post by:
Hi, I have a label that I'm trying to make invisible on the client side using the OnClientClick event for a button. In the javascript function I have the following code: var x =...
29
by: Nick | last post by:
I've seen a few frameworks use the following: function $(id) { return document.getElementById(id); } Then to use: $('something').innerHTML = 'blah'; I'm just trying to roll this out to my...
8
by: cyqotiq | last post by:
First, let me state that this is not necessarily a Firefox problem, as I haven't fully tested in IE just yet. Second, let me state that this is not the typical "getElementById not working Firefox"...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.