get_text problem

2 posts, 0 answers
  1. Donald Norris
    Donald Norris avatar
    66 posts
    Member since:
    Mar 2006

    Posted 23 Jul 2012 Link to this post

    I have attempted a file where I setup to use a RadButton.  I wanted to call a client-side routine on click and change the text of the button from Update to Updating, then execute server-side code for the click event.  I also want to test the text and if is not equal to update then do not allow executing the server-side code again.

    The problem is I get a compiler error everytime and way I try to use the get_text() function.  Please look at the code and tell me what I am doing wrong.

  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 24 Jul 2012 Link to this post


    I tried to reproduce your issue in telerik version 2012, 2, 607, 40 and it is working fine at my end. Here is the sample code.

    <telerik:RadButton ID="RadButton1" runat="server" Text="Update"  OnClientClicking="OnClientClicking" onclick="RadButton1_Click">

    <script type="text/javascript">
        function OnClientClicking(sender, args) {
            //Canceling the click event when the text is Update
            if (sender.get_text() == "Update") {

    Please provide your code if it doesn't helps.

  3. DevCraft R3 2016 release webinar banner
Back to Top