is there a way to over-right ID renaming?

D

darrel

If I have a div like this:

<div id="banner" runat="server">

When the page executes, it gets rewritten as such:

<div id="pageNameControl_banner">

is there anyway to NOT have it do that? It's a real PITA to map CSS to these
rewritten IDs and figure out what is what.

-Darrel
 
S

Steve C. Orr [MVP, MCSD]

I'd suggest you mark it with a specific CssClass attribute if your intention
is to use it with CSS.
 
D

darrel

I'd suggest you mark it with a specific CssClass attribute if your
intention is to use it with CSS.

That could work, but I loose some of the benefits of the ID. But maybe
that's not a big deal.

In the end, though, I decided to not deal with runat="server" divs and wrap
items in placeholders instead, which is probably best in terms of separating
HTML from codebehind logic.

-Darrel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,444
Messages
2,571,709
Members
48,796
Latest member
Greg L.
Top