0

I guess this should be simple, but...

I have an asp.net master page. In the master page I would like to add a hyperlink that should fire a server c# side event. Now all the posts I read so far says not to use a hyperlink, but a <asp:LinkButton> instead.

Problem is that the <asp:LinkButton> should be in a <form runat="server"> tag, but since this is on the master page, I already have a form section, like the one below, and I cannot have to form section on one form.

<form runat="server">
    <asp:ContentPlaceHolder ID="MainContent" runat="server"/>
</form>

So what is the ideal plan B?

Cameron Castillo
  • 2,712
  • 10
  • 47
  • 77
  • Take a look at this: http://stackoverflow.com/questions/7419519/paypal-form-ruins-my-asp-net-webforms-layout-how-to-solve/7518476#7518476 – IrishChieftain Mar 24 '14 at 18:51
  • One thing that also works, although I believe it can't be best practice, is to move the opening
    tag to the start of the Master doc.
    – Cameron Castillo Mar 25 '14 at 06:28

0 Answers0