How to update a control outside of an updatepanel?

前端 未结 3 895
心在旅途
心在旅途 2021-01-06 02:25

I am going to show some text in a TextBox, which is located outside of an updatepanel, after checking a CheckBox but I cannot make it work. please help me out ?

Here

3条回答
  •  灰色年华
    2021-01-06 02:47

    I put the TextBox in another UpdatePanel and then called the Update method:

    Here is my new code:

        
        
            
        
       
       
           
               
           
       
    

    Code Behind:

            protected void cbShowText_CheckedChanged(object sender, EventArgs e)
            {
               txtBox.Text = "Some Text";
               uplDetail.Update();
            }
    

    Hope this helps

提交回复
热议问题