Hi all,
We have a user control that contains a DropDownList. This user
control appears on a web page. Suppose the name of the userControl on
the web page is called "ucLookup". Suppose the name of the
dropDownList within the user control is called "cboList".
On my development PC running VS2005 on WinXP Pro, the rendered HTML for
the dropDownList looks like this:
<select name="ucLookup:cboList" id="ucLookup_cboList"
class="cboBodyNormal">
Notice that the name attribute contains a ':' (colon) between the
userControl name and the dropdownlist name.
On a production server running Windows Server 2003 and the .NET
framework installed from the redistributable, rather than from VS2005
(but still running the 2.0.50727 version), the rendered HTML is this:
<select name="ucLookup$cboList" id="ucLookup_cboList"
class="cboBodyNormal">
Notice now that there is '$' character in the name of the control.
Between the two environments, the only major difference I can think is
the OS (WinXP Pro vs Windows Server 2003), and that the .NET framework
on Windows Server box was installed from the redistributable, rather
than from VS2005
Has anyone noticed this before? Is there any kind of environment
setting that controls the separater character which is used here?
--steve 6 5025
Steve:
I dung into it for you using reflector (you should try it out) and came to
this:
internal char IdSeparatorFromConfig
{
get
{
if (!this.EnableLegacyRendering)
{
return '$';
}
return ':';
}
}
as part of the control class
EnableLegacyRendering goes deeper, not 100% sure, but it seems like it might
be (a) config driven (do a google search for it and you'll find a few posts
about it from the Beta 2 days), or based on some other page properties.
Karl
--
MY ASP.Net tutorials http://www.openmymind.net/
"n33470" <n3****@hotmail.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com... Hi all,
We have a user control that contains a DropDownList. This user control appears on a web page. Suppose the name of the userControl on the web page is called "ucLookup". Suppose the name of the dropDownList within the user control is called "cboList".
On my development PC running VS2005 on WinXP Pro, the rendered HTML for the dropDownList looks like this:
<select name="ucLookup:cboList" id="ucLookup_cboList" class="cboBodyNormal">
Notice that the name attribute contains a ':' (colon) between the userControl name and the dropdownlist name.
On a production server running Windows Server 2003 and the .NET framework installed from the redistributable, rather than from VS2005 (but still running the 2.0.50727 version), the rendered HTML is this:
<select name="ucLookup$cboList" id="ucLookup_cboList" class="cboBodyNormal">
Notice now that there is '$' character in the name of the control. Between the two environments, the only major difference I can think is the OS (WinXP Pro vs Windows Server 2003), and that the .NET framework on Windows Server box was installed from the redistributable, rather than from VS2005
Has anyone noticed this before? Is there any kind of environment setting that controls the separater character which is used here?
--steve
Just a bit more, based on http://www.google.com/search?sourcei...tmlConformance
the default would be Transitional. Only when it's set to Legacy would I
expect it to use :
I realize this doesn't answer questions about the difference between your
two invironment, just hoping it'll let you find it out. Perhaps it's a
difference in the machine.config.
--
MY ASP.Net tutorials http://www.openmymind.net/
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:eD**************@TK2MSFTNGP14.phx.gbl... Steve: I dung into it for you using reflector (you should try it out) and came to this:
internal char IdSeparatorFromConfig { get { if (!this.EnableLegacyRendering) { return '$'; } return ':'; } }
as part of the control class
EnableLegacyRendering goes deeper, not 100% sure, but it seems like it might be (a) config driven (do a google search for it and you'll find a few posts about it from the Beta 2 days), or based on some other page properties.
Karl
-- MY ASP.Net tutorials http://www.openmymind.net/
"n33470" <n3****@hotmail.com> wrote in message news:11**********************@g14g2000cwa.googlegr oups.com... Hi all,
We have a user control that contains a DropDownList. This user control appears on a web page. Suppose the name of the userControl on the web page is called "ucLookup". Suppose the name of the dropDownList within the user control is called "cboList".
On my development PC running VS2005 on WinXP Pro, the rendered HTML for the dropDownList looks like this:
<select name="ucLookup:cboList" id="ucLookup_cboList" class="cboBodyNormal">
Notice that the name attribute contains a ':' (colon) between the userControl name and the dropdownlist name.
On a production server running Windows Server 2003 and the .NET framework installed from the redistributable, rather than from VS2005 (but still running the 2.0.50727 version), the rendered HTML is this:
<select name="ucLookup$cboList" id="ucLookup_cboList" class="cboBodyNormal">
Notice now that there is '$' character in the name of the control. Between the two environments, the only major difference I can think is the OS (WinXP Pro vs Windows Server 2003), and that the .NET framework on Windows Server box was installed from the redistributable, rather than from VS2005
Has anyone noticed this before? Is there any kind of environment setting that controls the separater character which is used here?
--steve
Karl,
Thanks for the info! Where is the property "EnableLegacyRendering"
implemented? In your code example, what is the context of 'this' in
the line of code: if (!this.EnableLegacyRendering)
The help docs for VS2005 do not mention this property, and there is
intellisense clue in either a derived UserControl, or Page class.
Where is that property implemented?
--steve
Steve:
My original email had all the details ;) It's an internal property of the
Control class. That's why you don't see it in the docs/intellisense and
can't access it. It's only visible through a dissassembler such as
reflector. The only way to answer these questions is to get into the guts
of stuff.
Karl
--
MY ASP.Net tutorials http://www.openmymind.net/ http://openmymind.net/redirector.aspx?documentId=51 - Learn about AJAX!
"n33470" <n3****@hotmail.com> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com... Karl,
Thanks for the info! Where is the property "EnableLegacyRendering" implemented? In your code example, what is the context of 'this' in the line of code: if (!this.EnableLegacyRendering)
The help docs for VS2005 do not mention this property, and there is intellisense clue in either a derived UserControl, or Page class.
Where is that property implemented?
--steve
the change was done to make the names legal, colon are allowed in html
identifies but dollar signs are not. a colon in a id tags specifies a
namespace so ms uses a underscore.
it a bug in your code if you used the actual names (from viewing the source)
instead of the ClientId property to get it.
to get the 2003 behaviuor, set the XhtmlConformanceSection to legacy
(produce non-compliant xhtml)
-- bruce (sqlwork.com)
"n33470" <n3****@hotmail.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com... Hi all,
We have a user control that contains a DropDownList. This user control appears on a web page. Suppose the name of the userControl on the web page is called "ucLookup". Suppose the name of the dropDownList within the user control is called "cboList".
On my development PC running VS2005 on WinXP Pro, the rendered HTML for the dropDownList looks like this:
<select name="ucLookup:cboList" id="ucLookup_cboList" class="cboBodyNormal">
Notice that the name attribute contains a ':' (colon) between the userControl name and the dropdownlist name.
On a production server running Windows Server 2003 and the .NET framework installed from the redistributable, rather than from VS2005 (but still running the 2.0.50727 version), the rendered HTML is this:
<select name="ucLookup$cboList" id="ucLookup_cboList" class="cboBodyNormal">
Notice now that there is '$' character in the name of the control. Between the two environments, the only major difference I can think is the OS (WinXP Pro vs Windows Server 2003), and that the .NET framework on Windows Server box was installed from the redistributable, rather than from VS2005
Has anyone noticed this before? Is there any kind of environment setting that controls the separater character which is used here?
--steve
Bruce/Karl,
Thanks for the all the info!
This is not an issue with the use of ClientId, the error presented
itself as an issue with the Request.Forms variables posted back from
the web browser. Because the name attribute of the html tags is formed
differently amongst the xhtmlConformance mode settings, the posted
variable collection in Request.Forms had different contents. A
secondary issue that was corrected by this is that we have a huge
library of reusable testing scripts that do automated testing. The
automated test scripts use the rendered html for verification, and
because most of the tags rendered differently, it broke some of the
test scripts.
The following web.config setting fixed up the problems.
<xhtmlConformance mode="Legacy">
This setting was present on my development server because the ASP.NET
conversion wizard added it automatically to my web.config. However,
the setting was missing on the production server. The default
conformance mode, when there is no setting in the web.config, is
"Transitional".
Thanks again!
--steve This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: trinitypete |
last post by:
Hi all,
I have a user control that uses control literal to build
a heading with a link, and a div containing links below.
As the link heading is hit, I want to change the style of
the div,...
|
by: martin |
last post by:
Hi,
I am a web page and a web user control. My web user control is placed in my
web page using the following directive
<%@ Register TagPrefix="uc1" TagName="Header"...
|
by: A.M |
last post by:
Hi,
I have a validation control in my page that upon any invalid data, it
disables all buttons in the page. basicly i don't have any postback in the
page if the validator finds any error.
How...
|
by: John Holmes |
last post by:
I am using radioButton controls in a data repeater and would like to
incorporate the 'key' field into the 'id' attribute of the radioButton
controls and name them something like:
'rad' + '<%#...
|
by: John Lau |
last post by:
Hi,
Is there documentation that talks about the page lifecycle, the lifecycle of
controls on the page, and the rendering of inline code, in a single
document?
Thanks,
John
| |
by: darrel |
last post by:
I've asked this a few times and gotten answers, but I'm still missing a
piece of the puzzle.
Here's what I have:
- page.aspx
- title tag
- usercontrol.aspx
- usercontrol.aspx.vb
|
by: Steve Peterson |
last post by:
Hello
Is there a way to change the id of an generated html of an asp.net control?
What I mean is that, for example, if I have an textbox control and give it
an id of "txtName", the html...
|
by: mharness |
last post by:
Hello,
I've tried a number of examples showing how to read the properties of a user
control from an aspx file where the code is on the html view of the form but
I can't figure out how to read...
|
by: dcassar |
last post by:
I am working on a complex server control that dynamically creates an
HtmlInputHidden control that stores its value. As far as the postback
process is concerned, this hidden input acts as the...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |