Hi nauna,
I have checked th code its working correctly.
Make sure you don't have assigned PostBackTrigger to UpdatePanel.
Check this example. Now please take its reference and correct your code.
HTML
<asp:ScriptManager runat="server" />
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Timer1" EventName="Tick" />
</Triggers>
<ContentTemplate>
<asp:Label ID="lblTime" runat="server" />
<asp:Timer ID="Timer1" runat="server" Interval="1000" OnTick="UpdateTimer_Tick">
</asp:Timer>
</ContentTemplate>
</asp:UpdatePanel>
<br />
<asp:TextBox ID="txtmilesearch" runat="server" Text="300" CssClass="form-control"></asp:TextBox>
Code
C#
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
lblTime.Text = DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss");
}
}
protected void UpdateTimer_Tick(object sender, EventArgs e)
{
lblTime.Text = DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss");
}
VB.Net
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
lblTime.Text = DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss")
End If
End Sub
Protected Sub UpdateTimer_Tick(sender As Object, e As System.EventArgs)
lblTime.Text = DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss")
End Sub
Screenshot