Ajaxcontroltoolkit watermark expander timer flashes

I have an ASP.NET page where I

  • 1 Timer (Tick event - trigger for update panel)
  • 1 update panel
  • 1 Shortcut (in the update panel)
  • 1 TextBox
  • 1 WaterMark Extender (for TextBox)

The text field and the watermarkextander are outside the update field, there is another object on the page, but I do not list them, the timer does not affect them. When I write something in a text field, there is no problem, but when the text field is empty and the watermark indicator is active during the timer, the watermark text lights up.

What could be the problem?

The update panels work fine, no other object affects the timer tick, but somehow the watermark text blinks.

Could you help me in this matter?

Asp.net page:

    <script type="text/javascript">
    Sys.Application.add_load(function () {
        WebForm_OnSubmit = Sys.Extended.UI.TextBoxWatermarkBehavior._originalWebForm_OnSubmit;
    });
</script>


    <div>
        <ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
        </ajaxToolkit:ToolkitScriptManager>
        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>

        <ajaxToolkit:TextBoxWatermarkExtender ID="TextBox1_TextBoxWatermarkExtender" 
            runat="server" Enabled="True" TargetControlID="TextBox1" 
            WatermarkText="Some Text">
        </ajaxToolkit:TextBoxWatermarkExtender>

        <asp:Timer ID="Timer1" runat="server" Interval="1000" ontick="Timer1_Tick">
        </asp:Timer>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
        </ContentTemplate>
        <Triggers>
        <asp:AsyncPostBackTrigger ControlID="Timer1" EventName="Tick" />
        </Triggers>
        </asp:UpdatePanel>

    </div>

CodeBehind:

protected void Timer1_Tick(object sender, EventArgs e)
{
    Label1.Text = DateTime.Now.ToLongTimeString();
}
+1
1

WatermarkExtender. .

script ScriptManager:

<script type="text/javascript">
     Sys.Application.add_load(function () 
     {
          WebForm_OnSubmit = Sys.Extended.UI.TextBoxWatermarkBehavior._originalWebForm_OnSubmit;
     });
</script>

, , .

+1

All Articles