Web Analytics Made Easy -
StatCounter IE problem with showing divs - CodingForum


No announcement yet.

IE problem with showing divs

  • Filter
  • Time
  • Show
Clear All
new posts

  • IE problem with showing divs

    Hi Guys,

    I am relatively new to web development and am trying to make my website cross browser compatible. I am working with html and C# code in visual studio 2010. I am trying to show and hide divs, this works perfectly in Chrome and Firefox but IE seems to have a problem with the ID's of the buttons and divs. I know that the browser appends "ct100_" by default to the ID of any control and I have got it to actually fire the button click events (which also didn't want to work at first) by using this code:

    <!--[If IE]>
    <button ID="ct100_button1" runat="server">test</button>

    I do the same for the divs, but in my C# code where I show and hide the divs, when the buttons are clicked I can only use the origional ID that I gave the div (in this case it would be "button1") and not the "ct100_button1" ID because it is commented out in the html code and there for the C# doesn't see it as an ID but rather as a normal comment

    Any help would be appreciated

  • #2
    Use this code and create new css for IE <!--[if IE]>
    <link href="/CSS/InternetExplorer.css" rel="stylesheet" type="text/css" media="all" />
    iPhone App Development | iPad App Developer | iPhone Development