I have the following markup at the end of my Edit page template in a Dynamic Data project:
</asp:UpdatePanel>
<br />
<asp:Label ID="errorLabel" runat="server" Visible="false" ForeColor="Red">Helloooo</asp:Label>
<br />
And I have the following code in the code=behind for the template:
protected void DetailsView1_ItemUpdated(object sender, DetailsViewUpdatedEventArgs e)
{
if (e.Exception != null & !e.ExceptionHandled)
{
errorLabel.Text = e.Exception.Message;
errorLabel.Visible = true;
return;
}
Response.Redirect(table.ListActionPath);
}
The 'if' condition is true, and the errorLabel.Visible = true
etc. executes, but the label remains invisible on the rendered screen. What am I doing wrong?