Can someone please let me know how to call a C# method from onclick event using the example provided by Miguel Angelo in this link? How to get started with developing Internet Explorer extensions?
I have tried the following but it doesn't work. Is it possible to have a javascript run on Onclick and have that call a C# method? I have tried WebMethod, that didn't work either.
Both the following code is in the same .cs file
var newText = textNode.data.Replace(m.Value, "< span runat='server'; style='background-color: yellow; cursor: hand;' onclick='OnClientClick'; title='Click for more options.'>" + m.Value + "</span>");
c# method
protected void OnClientClick(object sender, EventArgs e)
{
MessageBox.Show("Called OnClientClick ");
}
Thanks in advance