Hi,
I have a master page whenere my RadAjaxManager is added and in the content pages, I have RadAjaxManagerProxy .
Now I need to display success/failure messages on the content page events like (button clicks , grid update/ combobox changed etc) in a Label in MasterPage.
Right now I am wiring each control which can cause a failure/success message to the RadAjaxManager using the following code:
RadAjaxManager AjaxManager = (RadAjaxManager)this.Master.FindControl("RadAjaxManager1");
//AjaxManager.AjaxSettings.AddAjaxSetting(RadButton1, Label1);
Label lblMessage = (Label)this.Master.FindControl("lblMessage");
AjaxManager.AjaxSettings.AddAjaxSetting(RadButton1, lblMessage);
This code works fine. But my concern is that in future we may add more buttons/grids/combo boxes in the page. Then I need to add the above code for all controls which may not a scalable solution. A new programmer may not know about the need to wire control as above.
So I was wondering if there is a way to do a generic wiring so that any event happening in the content page can update the label in the master page which is a common scenario.
I have a custom base class for all the pages. So a solution in the base class which will work for all the pages and future pages will be really great.
Any thoughts? Any help will be much appreciated. Thanks a lot..
I have a master page whenere my RadAjaxManager is added and in the content pages, I have RadAjaxManagerProxy .
Now I need to display success/failure messages on the content page events like (button clicks , grid update/ combobox changed etc) in a Label in MasterPage.
Right now I am wiring each control which can cause a failure/success message to the RadAjaxManager using the following code:
RadAjaxManager AjaxManager = (RadAjaxManager)this.Master.FindControl("RadAjaxManager1");
//AjaxManager.AjaxSettings.AddAjaxSetting(RadButton1, Label1);
Label lblMessage = (Label)this.Master.FindControl("lblMessage");
AjaxManager.AjaxSettings.AddAjaxSetting(RadButton1, lblMessage);
This code works fine. But my concern is that in future we may add more buttons/grids/combo boxes in the page. Then I need to add the above code for all controls which may not a scalable solution. A new programmer may not know about the need to wire control as above.
So I was wondering if there is a way to do a generic wiring so that any event happening in the content page can update the label in the master page which is a common scenario.
I have a custom base class for all the pages. So a solution in the base class which will work for all the pages and future pages will be really great.
Any thoughts? Any help will be much appreciated. Thanks a lot..