I decided to create a concealed <div>
on the same page and tried calling it with href="#"
, which worked perfectly. However, when I attempted to use the same code in ASP.net, I encountered some issues with Javascript or other factors that prevented it from functioning as intended. Strangely enough, it initially worked when the page first loaded, but subsequent undesirable side effects caused it to stop working.
Are there any other alternative methods to summon a hidden div on the same page without using # in the href attribute? I experimented with the following approaches:
OnClientClick="location.href='#inline_content2"
OnClientClick="#inline_content2;"
Although these methods technically work, they display the div without its content :(
The original code that functions flawlessly in plain HTML is:
href="#inline_content"
So, how can I successfully call my div on the same page with the id #inline_content without relying on the href attribute?