is there a way to over-right ID renaming?

  • Thread starter Thread starter darrel
  • Start date Start date
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
 
I'd suggest you mark it with a specific CssClass attribute if your intention
is to use it with CSS.
 
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

Back
Top