473,320 Members | 1,988 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,320 software developers and data experts.

CSS and Asp.Net 2.0 master pages

Hello,

When I use a master page all ID's are renamed to ct100_MyControl.

Consider I have a control which ID is not change on the client.

Consider that control would generate <atags on the client inside a
div where ID = "MyControl" and Class="MyCSS".

Well, I could redifine the <atags simply by using the following CSS:

div#pMyControl a, div#pMyControl a:link, div#pMyControl a:visited
{
color: #404040;
text-decoration: none;
}
The problem is that the control ID is changed to div#ct100_pMyControl.

Yes, I know: I could use ct100_pMyControl in my CSS code.

However this seems wrong to do and forces me to check all client ID's
after running the web site.

Could someone tell me what should be the solution for this Asp.Net 2.0
problem?

Thanks,

Miguel

Sep 21 '06 #1
2 1303
put a class specifier on the control instead.

-- bruce (sqlwork.com)

"shapper" <md*****@gmail.comwrote in message
news:11**********************@m7g2000cwm.googlegro ups.com...
Hello,

When I use a master page all ID's are renamed to ct100_MyControl.

Consider I have a control which ID is not change on the client.

Consider that control would generate <atags on the client inside a
div where ID = "MyControl" and Class="MyCSS".

Well, I could redifine the <atags simply by using the following CSS:

div#pMyControl a, div#pMyControl a:link, div#pMyControl a:visited
{
color: #404040;
text-decoration: none;
}
The problem is that the control ID is changed to div#ct100_pMyControl.

Yes, I know: I could use ct100_pMyControl in my CSS code.

However this seems wrong to do and forces me to check all client ID's
after running the web site.

Could someone tell me what should be the solution for this Asp.Net 2.0
problem?

Thanks,

Miguel

Sep 21 '06 #2

But if the control was made by me and I only have the DLL ...

bruce barker (sqlwork.com) wrote:
put a class specifier on the control instead.

-- bruce (sqlwork.com)

"shapper" <md*****@gmail.comwrote in message
news:11**********************@m7g2000cwm.googlegro ups.com...
Hello,

When I use a master page all ID's are renamed to ct100_MyControl.

Consider I have a control which ID is not change on the client.

Consider that control would generate <atags on the client inside a
div where ID = "MyControl" and Class="MyCSS".

Well, I could redifine the <atags simply by using the following CSS:

div#pMyControl a, div#pMyControl a:link, div#pMyControl a:visited
{
color: #404040;
text-decoration: none;
}
The problem is that the control ID is changed to div#ct100_pMyControl.

Yes, I know: I could use ct100_pMyControl in my CSS code.

However this seems wrong to do and forces me to check all client ID's
after running the web site.

Could someone tell me what should be the solution for this Asp.Net 2.0
problem?

Thanks,

Miguel
Sep 21 '06 #3

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

Similar topics

1
by: Sasha | last post by:
Hi all asp.net proffesionals out there, How do you implement master pages in your applications? What libraries do you use and what have been your experience? Sasha
5
by: Michael Herman \(Parallelspace\) | last post by:
1. What are some compelling solutions for using Master/Content pages with Web Pages? 2. If a content area has a web part zone with web parts, what is the user experience like when "editting" the...
20
by: Alan Silver | last post by:
Hello, In classic ASP, I used to use two include files on each page, one before and one after the main content, to provide a consistent layout across a web site. That way I could just change the...
1
by: Alan Silver | last post by:
Hello, I am just experimenting with master pages, and am trying to add a content placeholder in the <head> section, so that individual pages can set their own page title and meta tags. The...
17
by: Rob R. Ainscough | last post by:
Again another simple concept that appears NOT to be intuitive or I'm just stupid. I've read the WROX book and the example doesn't actually show how the .master page links in the other content...
7
by: xkeops | last post by:
Thinking of creating a website, most of the pages will have a general toolbar menu, a content and a footer. The content will be the only one who's gonna change but the rest (header,footer) will...
8
by: JT | last post by:
Hi, I have done a fair amount of style editing inline in ASP. I'm now using VS 2005 with a standard web project (not Web Application Project). This is my first foray into CSS in a style sheet...
3
by: Rich | last post by:
Hi, I want to use 2 master pages, one for the main part of the site, the other for the admin pages. They are quite similar, with many shared elements. Ideally I would like to have a parent...
13
by: Kirk | last post by:
I have been reading Scott Allen's article on Master Pages (http:// odetocode.com/Articles/450.aspx) but I am having problems understanding a concept. Specifically, I have created a property...
6
by: Mickey | last post by:
Coming from a Dreamweaver/ASP/PHP background. Planning to use Visual Studio 2008 for a website. Complete newbie question here (please be gentle!): Do master pages work similar to Dreamweaver...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.