<%-- This LinkButton will break all the event handlers in this and other user controls on the page --%> <asp:LinkButton runat="server" ID="_linkButtonTest" Text="Test" PostBackUrl="http://www.google.com" /> <br /> </fieldset>
TestControl.ascx.vb :
Partial Class TestControl Inherits System.Web.UI.UserControl
Protected Overloads Overrides Sub OnInit(ByVal e As EventArgs)
MyBase.OnInit(e)
_textBoxTest.Text = "Initial OnInit Value"
End Sub
Protected Sub _buttonTest_Click(ByVal sender As Object, ByVal e As System.EventArgs)
LinkButton PostBackUrl causes all button events not to fire
Dear Umbraco
I lost about a whole day on this, so hopefully it can help others (or me again after I'll forget)
For some reason Umbraco 4.5 have a problem with a LinkButton and it causes all the button events not to fire
(I wonder if more asp: server controls are affected)
TestControl.ascx :
<%@ Control
Language="VB"
Inherits="TestControl"
CodeFile="TestControl.ascx.vb"
%>
<fieldset>
<br />
<legend>TestControl</legend>
<asp:TextBox runat="server" ID="_textBoxTest" />
<asp:Button runat="server" ID="_buttonTest" OnClick="_buttonTest_Click" Text="Test" />
<%-- This LinkButton will break all the event handlers in this and other user controls on the page --%>
<asp:LinkButton runat="server" ID="_linkButtonTest" Text="Test" PostBackUrl="http://www.google.com" />
<br />
</fieldset>
TestControl.ascx.vb :
Partial Class TestControl
Inherits System.Web.UI.UserControl
Protected Overloads Overrides Sub OnInit(ByVal e As EventArgs)
MyBase.OnInit(e)
_textBoxTest.Text = "Initial OnInit Value"
End Sub
Protected Sub _buttonTest_Click(ByVal sender As Object, ByVal e As System.EventArgs)
_textBoxTest.Text = DateTime.Now.ToString()
End Sub
End Class
We have experienced the same problem:
http://our.umbraco.org/forum/using/ui-questions/10535-Nested-master-pages,-controls-not-doing-a-right-postback
is working on a reply...