Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I have a UserControl which I have tested in isolation & it works fine.
When I dynamically load the control in my isolated test case it works when it's added in Page_Init.
I can replicate Umbraco's behaviour when I load the control in Page_Load. Which is to say that all input values are lost in the code behind.
At what point are UserControls loaded in Umbraco? Is this a bug in 4.11.1?
Hi Robert
Could you show some of the code?
Is this happening on a fresh install or have it been upgraded from a previous version?
/Jan
Code as simple as;
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> <asp:Button ID="Button1" runat="server" Text="Button" /> <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
protected void Page_Load(object sender, EventArgs e) { Label1.Text = "Text: " + TextBox1.Text; }
TextBox1.Text is always String.Empty (however the textbox retains it's value in the UI element itself)
This is an upgraded version from 4.7 upwards through most versions
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
UserControls loose input values on postback v4.11.1
I have a UserControl which I have tested in isolation & it works fine.
When I dynamically load the control in my isolated test case it works when it's added in Page_Init.
I can replicate Umbraco's behaviour when I load the control in Page_Load. Which is to say that all input values are lost in the code behind.
At what point are UserControls loaded in Umbraco? Is this a bug in 4.11.1?
Hi Robert
Could you show some of the code?
Is this happening on a fresh install or have it been upgraded from a previous version?
/Jan
Code as simple as;
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:Button ID="Button1" runat="server" Text="Button" />
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
protected void Page_Load(object sender, EventArgs e) {
Label1.Text = "Text: " + TextBox1.Text;
}
TextBox1.Text is always String.Empty (however the textbox retains it's value in the UI element itself)
This is an upgraded version from 4.7 upwards through most versions
is working on a reply...