1 Attachment(s)
Problems with Update in Ext:Label
Hello, a query. I have a control Ext: Label and I'm doing updates from the client side and server-side. Each works to perfection. The problem appears when the update is first performed from the client side by pressing the button "Client Execute method" (from a javascript function). Then, when it comes to upgrade from the server side, this does not make the upgrade to control Ext: Label.
Codigo aspx
Code:
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script type="text/javascript" language="javascript">
var updateLabel = function () {
var msg = "Updated from Client!!!"
Ext.fly("lblTestEN").update(msg);
};
</script>
</head>
<body>
<ext:ResourceManager ID="ResourceManager1" runat="server">
</ext:ResourceManager>
<form id="form1" runat="server">
<div>
<ext:Label ID="lblTestEN" runat="server">
</ext:Label>
</div>
<div>
<ext:Button ID="btnTestClient" runat="server" Text="Execute Client method">
<Listeners>
<Click Fn="updateLabel" />
</Listeners>
</ext:Button>
<ext:Button ID="btnTestServer" runat="server" Text="Execute Server method">
<DirectEvents>
<Click OnEvent="btnTestServer_Click">
<EventMask Msg="Processing..." ShowMask="true" MinDelay="500" />
</Click>
</DirectEvents>
</ext:Button>
</div>
</form>
</body>
</html>
Codigo de servidor
Code:
protected void btnTestServer_Click(object sender, DirectEventArgs e)
{
string msg = "Updated from server!!!";
lblTestEN.Text = msg;
}
Later, I found it necessary to add the following line in the server-side method.
Code:
lblTestEN.Update();
But in doing this the design of controls is affected. That is, the label is displayed in a different place that was located initially.
Attachment 2541
As I can solve this problem?
Thansk for all...
FAFNER