I want to know if it’s possible to call a custom function in code behind from a html element.
For example
ASPX file
<a id="link" CustomAttributes="Custom Value" OnClick="link_click" runat=server>link</a>
ASPX.CS file
protected void link_click(object sender, EventArgs e)
{
response.redirect("blabla.aspx?id="+link.Attributes["CustomAttributes"]);
}
Thanks,
Mattia Quaglietta
I tried the code above but it doesn’t work