?
Solved

ASP.Net clientId render incorrectly.

Posted on 2014-03-03
7
Medium Priority
?
386 Views
Last Modified: 2014-03-12
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
0
Comment
Question by:Bob Hoffman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 16

Expert Comment

by:SriVaddadi
ID: 39903728
Specify client id mode to "Predictable"

example:

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

You can find more info here
0
 
LVL 8

Author Comment

by:Bob Hoffman
ID: 39903774
This is that same as doing it globally in a page directive.... had no affect. Thanks
0
 
LVL 16

Expert Comment

by:SriVaddadi
ID: 39903815
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.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 8

Author Comment

by:Bob Hoffman
ID: 39903856
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
0
 
LVL 8

Accepted Solution

by:
Bob Hoffman earned 0 total points
ID: 39912963
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
0
 
LVL 16

Expert Comment

by:SriVaddadi
ID: 39913054
Thanks for shaing the solution. Greatly appreciate it
0
 
LVL 8

Author Closing Comment

by:Bob Hoffman
ID: 39922905
Found the solution on my own.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
This Micro Tutorial will demonstrate how nuggets on the Web are formatted by using Chrome Developer Tools. These tools would not only view the site's CSS but it can also modify it and save the CSS to use on your own site.
How to create a custom search shortcut to site-search Experts Exchange using Google in the Firefox browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch your Bookmark Menu: Press 'Ctrl +…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question