I have a situation where I am dynamically adding some content to popup box (which is a div) on my page from c#
HtmlGenericControl content = new HtmlGenericControl();
content.InnerHtml = "<a id='close' href='' onclick='action()'>close</a><span>Some text here</span>";
divcontrl.Controls.Add(content);
divcontrl.Attributes.Add("class", "myclass");
javascript method:
function action() {
$('.myclass').hide();
}
If I keep href='' on anchor it's closing the window but reloading the page, if I remove it not closing the window.