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

Ajax Refresh user Controls

1 Answer 122 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Bertrand
Top achievements
Rank 1
Bertrand asked on 09 Nov 2009, 08:08 PM
  • I have a user Control containing this:

 

 

<%@ Register Src="~/uc1.ascx" TagName="test" TagPrefix="uc1" %>   
<%@ Register Src="~/uc2.ascx" TagName="test"TagPrefix="uc2" %> 
<uc1:test ID="uc1" runat="server" />   
<uc2:test ID="uc2" runat="server" />   
 
 

 

 

Code Behind:

 

   protected void Page_Load(object sender, EventArgs e)   
     {  
        RadAjaxManagerProxy AjaxManager = (RadAjaxManagerProxy)this.FindControl("RadAjaxManagerProxy1");   
         AjaxManager.AjaxSettings.AddAjaxSetting(uc1.FindControl("Button1"),uc2.FindControl("TextBox1"));   
   
     }  
 
 
 
   
 

 

 

  • User Control 1 is

    

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="uc1.ascx.cs" Inherits="App_TelusPHR_uc1" %>   
 
    <asp:Button ID="Button1" runat="server" Text="Button" />   
 

 

 

User Control 2 is

  

  <%@ Control Language="C#" AutoEventWireup="true" CodeFile="uc2.ascx.cs" Inherits="App_TelusPHR_uc2" %>   
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>   
 

 

 

 

 

  code Behind

 

   public static int count = 0;   
 
    protected void Page_Load(object sender, EventArgs e)   
    {  
    count++;  
    TextBox1.Text = count.ToString();  
    }  
 
 

 


User control 2 is never refreshed..... any idea?

 

 

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 12 Nov 2009, 05:17 PM
Hi Bertrand,

I hope the following information will be helpful to you:
MasterPages: initiating requests from one ContentPlaceHolder and loading/updating controls in another
Add AjaxSettings programmatically

Sincerely yours,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Ajax
Asked by
Bertrand
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or