Currently, my site uses a function in the code behind to generate html links to that open a pop-up to a page based on the id that is passed to the function.
<%= openPlanFinderGlossary("0093") %>
public static string openPlanFinderGlossary(string id)
{
string retVal;
string altText;
string termName = getGlossaryTermName(id);
if (PlanFinderSessionManager.Demographics.LanguageIndex == 2)
{
altText = "Definición glosario para " + termName + " - abre una ventana nueva";
}
else //deault to English
{
altText = "Glossary definition for " + termName + " - Opens in new window";
}
retVal = "<a class=\"InputText InputTextPrint\" href=\"javascript:openWindow('planfinder-glossary.aspx?termId="
+ id + "')\"title=\"" + altText + "\"><span class=\"HiddenText\">" + altText + "</span>[?]</a>";
return retVal;
}
The problem is that recently our client added a requirement that when the user clicks the print button on the page, all links must be disabled. I've tried to convert this to an asp:HyperLink but that doesn't work and I've tried to add and id and the runat="server" in order to check the page for the HTMLAnchor types but that hasn't worked either. Is there any way that I can make this accessible from the code behind?
Thanks in advance for any help.