Is it possible to use JavaScript functions to show and hide an element on a webpage by calling them from within a C# method?
UPDATE: I attempted to use RegisterStartupScript (shown below) but unfortunately, it did not successfully hide the elements as intended:
HidePopup("CompanyHQSetup", "$('#<%=DivDataProvider.ClientID %>').hide();$('#<%=modalOverlay.ClientID %>').hide();");
private void HidePopup(string Key, string jscript)
{
string str = "";
str += "<script language='javascript'>";
str += jscript;
str += "</script>";
RegisterStartupScript(Key, jscript);
}
UPDATE: I was able to work around this issue by using a hidden field boolean to determine whether the elements should be hidden or shown.