ASP.Net Label Control in Telerick

2 posts, 0 answers
  1. Amir
    Amir avatar
    1 posts
    Member since:
    Jul 2015

    Posted 14 Jul 2015 Link to this post

    I am simply trying to display a value from label control, the value is setting from the code behind. But I could not find any good example. Either telerik told me that this is not possible or give me a good example. Please note that if I set the text in the markup it works but setting its value from the code behind does not work.

    I am opening a popup from jquery to display the label control.

     <telerik:RadWindow ID="RadWindow1" runat="server" Behaviors="Resize, Close"
                                    Modal="True" ShowContentDuringLoad="False" VisibleStatusbar="False" AutoSize="False"
                                    Width="455" ReloadOnShow="True" Height="260" Title="Opening Balance">

     <asp:Panel ID="Panel​1" runat="server">
                                                                    <table class="margin-all-10">
                                                                            <td class="label">
                                                                                Bank: <asp:Label ID="lblLabel1"  Text="" runat="server"></asp:Label>

     Protected Sub AddBegBalance_Command(ByVal sender As Object, ByVal e As CommandEventArgs)

                lblLabel1.Text = "Some Text"
        ScriptManager.RegisterStartupScript(UpdatePanel1, UpdatePanel1.GetType, "alert1", "Display();", True)

        End Sub​

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

    function ShowModifyAddBalan() {
               var _wndwAddOpenBalan = $find("<%= RadWindow1.ClientID %>");


  2. Vessy
    Vessy avatar
    1663 posts

    Posted 17 Jul 2015 Link to this post

    Hi Amir,

    Can you please provide a little more details on the exact moment in which you want to change the text of the label?
    • Which is the event handled by the AddBegBalance_Command function?
    • Where is the UpdatePanel1 placed?
    • Do you have AjaxManager on the page, or any other update panels?

    I am attaching a very simple page demonstrating how the label can be updated on a button click. The page is also containing RadAjaxManager in order to update the text of the label via AJAX, without closing the window. If your scenario is different though, please, send us a runnable sample demonstrating the configuration used by so we will be able to advice you further.

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top