QUERY: JavaScript vs. ASP.NET Web/Server Controls

Is it possible for JavaScript to access the DOM of ASP.NET Web/Server

For example, I have a legacy HTML forms, controls, etc. If I convert all
my HTML into Web Controls (by adding runat="server & id="") then will
this affect my JavaScript code that accesses/modifies the DOM of the page
(DOM tables, childs, elements, traversing, etc.) If so, what is the best
way to make them compatible again?


  • Coverting controls to asp.net controls should not mess up your javascript ... the the ID of the asp.net control should be the same name and ID as the original control.

    The only time you may have an issue is when you start putting your controls inside the item template of a Repeater, DataList, or DataGrid ... these controls attach its id to its child controls.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion