CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > NEWSGROUP > Asp.Net Forum > microsoft_downloads.css_friendly_control_adapters Tags:
Item Type: NewsGroup Date Entered: 8/29/2006 11:08:40 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 1 Views: 136 Favorited: 0 Favorite
2 Items, 1 Pages 1 |< << Go >> >|
Brave.heart
Asp.Net User
Name Mangling8/29/2006 11:08:40 PM

0

Hi All

Based on a question I asked in a previous thread where the replies did not give me comfort, I decided to do some research and would like to pass my findings on to this forum as I believe it is important to what you are trying to achieve.

Name Mangling means ID attributes are altered when master pages are used.

If I use an ID="name" against some element in a page that is inside a ContentPlaceHolder with an ID="Contents", that is in a master page, the id is changed from "name" to "ctl00_Contents_name" to aid with page uniqness.

This causes problems for both CSS ID selectors and JavaScript ID hooks.

Changing ID to class will help resolve the CSS problem but not the JavaScript one.

The "ctl00_Contents_" will remain constant throughout the page making it easier to reference other elements, "email" becomes "ctl00_Contents_email".

To maintain accessible XHTML in .Net we could code our web form like this:

<label accesskey="N" for="ctl00_Contents_name">Name: </label>
<asp:TextBox ID="name" CssClass="text" tabindex="1" runat="server"></asp:TextBox>


Which reneders fine as:

<label accesskey="N" for="ctl00_Contents_name">Name: </label>
<input name="ctl00$Contents$name" type="text" id="ctl00_Contents_name" class="text" />


If I had some JavaScript that used code like this:

attachBorderAndSelect('name');

To get the process to run correctly we need to modify it to:

attachBorderAndSelect('ctl00_Contents_name');

I like to keep all my JavaScript in a separate file (Like we do with our CSS) but if you embed the JavaScript inside the Web form we could use code like this:

attachBorderAndSelect('<%= name.ClientID %>');


and for the accessible markup, use this code:

<label accesskey="N" for="<%= name.ClientID %>">Name: </label>
<asp:TextBox ID="name" CssClass="text" tabindex="1" runat="server"></asp:TextBox>


If anyone can improve on this or knows how to disable name mangling I would love to hear from you.

Bill Wallace

jsuprianto
Asp.Net User
Re: Name Mangling7/5/2007 1:06:09 AM

0

Hi Brave.heart, How about your problem described above ? Have you find the solutions ? Honestly, right now i have the same problem. 

Thanks, 

2 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Using Samba Authors: Jay Ts, Robert Eckstein, David Collier-Brown, Pages: 539, Published: 2003
Learning Python Authors: Mark Lutz, David Ascher, Pages: 591, Published: 2004
C++ how to Program: How to Program Authors: Paul J. Deitel, Pages: 1429, Published: 2008
Essential COM Authors: Don Box, Pages: 440, Published: 1998
Linkers and Loaders Authors: John R. Levine, Pages: 256, Published: 2000
Game Programming Gems Authors: Mark A. DeLoura, Pages: 614, Published: -1
Practical C++ Authors: Mark A. Terribile, Pages: 681, Published: 1994
Expert C Programming: Deep C Secrets Authors: Peter Van der Linden, Pages: 353, Published: 1994

Web:
Name mangling - Wikipedia, the free encyclopedia Nov 5, 2008 ... This article is about name mangling in computer languages. For name mangling in file systems, see filename mangling. ...
Name Mangling Name mangling is the encoding of function and variable names into unique names so that linkers can separate common names in the language. ...
C++ Name Mangling/Demangling Apr 30, 2002 ... The name mangling scheme seems to be based on the one in the C++ Reference Manual, and is partly documented at ...
[Chapter 5] 5.4 Name Mangling and Case This is called name mangling, and Samba deals with this in a manner that is similar, but not identical to, Windows 95 and its successors. ...
What's in Name Mangling? Name mangling, (the more politically correct term is name-decoration, although it is rarely used) is a method used by a C++ compiler to generate unique ...
What is Name Mangling and how to disable Name Mangling? « Visual ... Jul 16, 2008 ... Name mangling is the technique used by C++ to generate unique names. C++ uses name mangling to implement function overloading etc. ...
Gabriel Dos Reis - Re: C++ ABI: name mangling of operator new [bug ... Jul 26, 2007 ... In terms of the | information needed in the mangled name, it should be ternary | as there are placement arguments, the type, and constructor ...
Mandalika's scratchpad: C++: Name Mangling process is called name mangling. Linker uses these mangled names to ... function name as the symbol name. To solve that, C++ uses name mangling, which ...
Microsoft Visual C++ Name Mangling - Wikipedia, the free encyclopedia Nov 13, 2008 ... Microsoft Visual C++ Name Mangling is a mangling (decoration) scheme used in Microsoft Visual C++ series of compilers. ...
Francisco J. Royo Sa - Re: Convert GCC under Cygwin Name Mangling ... The RTTI is incompatible, the exception handling is incompatible, the name mangling is incompatible, the parameter pushing is incompatible, ...

Videos:
McCain can't pronounce Ahmadinejad MCCAIN:without precondition, without precondition. Now here is Ahmadinejad, Ahmadinejad
Mangle druid pvp Wow Name sorta explains it all.. first movie not very well made, great music though
Squint Eye Mangle / Big Carrot / Marc Bolan Marc...trying out the cosmic Interstellar Soul sound under the name BIG CARROT!
GCCCONCEPTS #13 GNU's Not Unix Compiler Collection GCC Concepts http://www.cfdvs.iitb.ac.in/~amv/gcc-int-docs/html/gcc-conceptual-structure.html : can be bound to unique addresses on target hardware. Naming ...
Variations1924 This is one of those once-only improvisations, the kind I can never play twice. It was inspired by a very famous 20th-century composition by one ...
I Like Ike by D. Taylor Singletary Assembled and mangled from archive.org footage, the film tells a story of the rise to power of a gimmicky politician in a time of crises: Aliens ...
Song 9 (Acoustic)-Mangled Digits Song 9 - Mangled Digits Acoustic Version (We don't have a name for this song yet) Check us out at www.myspace.com/mangleddigits
RE: Truth without Proof - Godel's incompleteness Theorem NOTE: Please excuse my mangling for Godel's name! NOTE 2: I was on a role with this one. Its rational numbers, not irrational numbers!!! LMAO ...
coolness song music video i used a fake band name becuase i found the ideas amusing but this is a short jazz fusion tune made by me,pointless video also starring me
Metallica - My Apocalypse My Apocalypse by Metallica off their new album, Death Magnetic. LYRICS Claustrophobic Crawl out of this skin Hard explosive Reaching for ...






asp menu shows over text in ie 7

flicker fix

menu divider or seperator using css and or css adapters.

please help – dynamically load parents images to tree menu

problem with sitemap content

how can i load this in vs 2005?

menu adapter treating top-level menu items as links

empty template support for gridview

formal justification for using css-friendly control adapters

setting id for menu adapter and output it in the li tags

"cell" link ie wierdness in menu list <li> with class aspnet-menu-leaf

trying to use adapter to modify validationsummary to use span instead of div

menu: help adding more css rules for 4 or more tiers

adapter for asp:image control

login - can't retrieve username and password

right to left dynamic vertical menu with css friendly control adapters.

menu overlay issue with absolute and relative positioned elements only in ie.

menu css adapter and sqlsitemapprovider

gridview <emptydatatemplate>

centering static level of horizontal menu.

i need build "repeatlayout" support myself?

adapted menu rendering flat

problem in cached pages (master page?)

uniquely identifying menu items

menu adapter problem with ie6 when re-sizing window

css adapters ok on sharepoint desinger?

ie issue on adapter menus with css z-index

css adapter changes login control behavior

css adapter treeview and populate on demand using ajax...

problems with horizontal orientation

   
  Privacy | Contact Us
All Times Are GMT