Click here to Skip to main content
13,402,670 members (43,399 online)
Rate this:
Please Sign up or sign in to vote.
See more:
HI I am developing a program which requires to read updated value of a Label control in updatePanel using javascript code please help

I am using following javascript code to do the same...
but not succeeded..some need some help


    function endRequestHandler()
    var userID = '<%= Label1.Text %>';
</script >

It returns the first value always....but I need the current value(updated Value)..

Thanks in Advance.
Posted 31-Jan-13 21:42pm
vinodkumarnie 1-Feb-13 4:46am
can you share your source code...?
Raaj_007 1-Feb-13 5:23am
Here is the code


<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<head runat="server">

<form id="frmGridView" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server"/>

<script type="text/javascript" language="javascript">

function endRequestHandler()

var userID = "";

<asp:UpdatePanel ID="updatePanel1" runat="server" UpdateMode="Conditional">

<asp:Timer ID="Timer1" runat="server" Interval="300" ontick="Timer1_Tick">

<asp:Label ID="Label1" runat="server" Text="Label">
<br />

<asp:AsyncPostBackTrigger ControlID="Timer1" />


protected void Timer1_Tick(object sender, EventArgs e)
gridView.DataSource = GetDataSource();


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03 | 2.8.180218.2 | Last Updated 1 Feb 2013
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100