Posted on: 1/23/2015 3:24:03 AM | Views : 563

I need to change an <a href=... to a LinkButton so that I can execute some C# code.
Here's what I added:
<asp:LinkButton ID="linkButtonFullSite" runat="server" OnCommand="linkButtonFullSite_Click"> <img src="/img/mobile/icons/main.png" width="20" height="20" /><br />Full Site </asp:LinkButton> I then recompiled the site and tried loading the page but got this error:
Control 'ctl00_Footer_linkButtonFullSite' of type 'LinkButton' must be placed inside a form tag with runat=server.
So up above I added this code:
<form runat="server"> <script language="C#" runat="server"> protected void linkButtonFullSite_Click(object sender, EventArgs e) { } </script> </form> Unfortunately the same error ...

Go to the complete details ...