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

Javascript stopped working with the Load User Control

1 Answer 115 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jaideep
Top achievements
Rank 1
Jaideep asked on 06 Feb 2012, 04:12 PM
Hi,

I have an application, which have only one page and master page and all the screens are ascx controls and gets loaded dynamically with the use of LoadUserControl method.

The issues are :
1) Javascript does not works at all even that lies there in the master page. (The URL is : http://localhost:portnumber/abc/object) (As I have used the routing here)
2) Rad Window does not calls back the Javasccript button on one of its control. (Search control gets opened up in the Rad window and javascript exists there, does not get fired. However the inline alert works fine on the get button)
3) On the Tree list when I calls up the database program to bind the data, the data comes up properly but does not get bind properly some time. Like if the data return the count as 50 it will not display all 50 records sometimes, reason I understand could be that when ever the child of the existing records want to bind itself to the tree, the tree  get refreshed or rebind itself and thats why AJAX stops it to how all the records.

Main problems behind all these issues seems to be either the CSS and Themes or the AJAX update panel.
Please find the attached code for further clarrification.

Please help as it is very urgent and also suggest if I have missed something in Loading Control lifecycle at my own.

Thanks in advance!

Looking forward to buy more products from telerik, once we got succeedded in this project.

1 Answer, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 08 Feb 2012, 12:40 PM
Hello Jaideep,

We have already answered your enquiry in the support ticket that you opened. Please take a look at it and if you have any further questions or comments, post them there, so that we avoid double posting.

If anyone else is interested, our advice to load user controls in AJAX-enabled scenarios is to do so in the Page_Load event without overriding any of the ASP.NET methods. You can find more information on the matter here:
Load User Controls
A live demo shows this functionality at the following address:
Ajax / Loading User Controls
 

Greetings,
Tsvetina
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
General Discussions
Asked by
Jaideep
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
Share this question
or