Sorry, but your making this overly difficult on yourself mate, you don't need to do what your doing. Try this:
On the .aspx page in the HTML have this:
Code:
<asp:LinkButton ID="link1" runat="server" Text="Link1" OnClick="button_Click"></asp:LinkButton>
<asp:LinkButton ID="link2" runat="server" Text="Link2" OnClick="button_Click"></asp:LinkButton>
And your C# code:
Code:
protected void button_Click(object sender, EventArgs e)
{
switch (((LinkButton)sender).ID)
{
case "link1" : Link1Actions(); break;
case "link2": Link2Actions(); break;
}
}
No need for JavaScript, and doing things the proper .NET.
Bookmarks