This is a migrated thread and some comments may be shown as answers.

Cannot change asp button text in code behind

2 Answers 38 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Richard M
Top achievements
Rank 1
Richard M asked on 16 Jun 2010, 09:23 PM
I am running a test where I click a button and the text on that button will change from Button1 to Button2, and it is not working.  I have tried it with the AjaxManager and it does not work.

Protected Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
     Button1.Text = "Button2"
End Sub

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 17 Jun 2010, 05:59 AM
Hi Richard,

If you are trying to ajaxify the button using AjaxManager, then you need to set the "AjaxSettings - UpdatedControls" accordingly.

aspx:
 
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="Button1"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="Button1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 


-Shinu.
0
Richard M
Top achievements
Rank 1
answered on 17 Jun 2010, 07:44 PM
Thank you.
Tags
Grid
Asked by
Richard M
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Richard M
Top achievements
Rank 1
Share this question
or