ASP.Net clientId render incorrectly.

Bob Hoffman
Bob Hoffman used Ask the Experts™
on
On some PCs (not all) my the clientIds in a repeater control get out of whack. This problem is specific to IE11 but I don't see the issue on most IE 11 PCs. I have a PC in my development environment that has the problem, I have another one that does not. Both these PCs are running Win 7 64 bit and the IE setup is identical. I've tried several variations of the page directive "ClientIDMode" but it doesn't seem to correct my issue.
I've also tried some meta tags to force it to render in a specific IE version but that had no affect. See attachment for more details

 Thanks in advance






Server is: IIS7 .net 4.5
Website is: C# vs 2012
example.docx
bad.txt
bad.txt
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Specify client id mode to "Predictable"

example:

<asp :TextBox ID ="txt" runat ="server" ClientIDMode ="Predictable" />

You can find more info here
Bob HoffmanDeveloper

Author

Commented:
This is that same as doing it globally in a page directive.... had no affect. Thanks
The default value of ClientIDMode for a page is Predictable. The default value of ClientIDMode for a control is Inherit.

However, if you use Visual Studio to convert a Web project to ASP.NET 4 from an earlier version, Visual Studio automatically sets the site default to AutoID in the Web.config file.
Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

Bob HoffmanDeveloper

Author

Commented:
The solution started out as ASP.Net 4, there is no AutoId in the web.config, only the page directive. I tried all the various ClientIDModes at the page directive level, I could see in the Ids in markup were changed as expected, but on my one dev box it was still messing up?  I pretty sure that it has something to do with the client not the site itself, I just can't isolate the issue. Thanks
Developer
Commented:
Solution was to move the no-cache meta tags to the bottom of the page and to turn off IIS7 Static HTTP compression and  turn on dynamic HTTP Compression. Never figured out why the problem was NOT on all IE 11 PCs?

This link explain why move the no-cache meta tags to the bottom makes a difference:

http://www.htmlgoodies.com/beyond/reference/article.php/3472881
Thanks for shaing the solution. Greatly appreciate it
Bob HoffmanDeveloper

Author

Commented:
Found the solution on my own.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial