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

Implementation of Page_Init method breaks Telerik's implementation of Sys.Application.add_init(function()

0 Answers 226 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Flea#
Top achievements
Rank 1
Flea# asked on 19 Sep 2011, 09:07 PM
I have a few telerik calendar controls on an ascx control along with other regular objects such as text boxes etc....

I needed to set the Id of the control so I added the following code to my code-behind:

protected void Page_Init(object sender, EventArgs e)
{
    this.ID = "MyFormId"
}

After I did this, built the website and loaded the page I noticed that my telerik calendar controls were no longer working and I saw a JavaScript error was being thrown saying "Uncaught SyntaxError: Unexpected identifier" and then when I go to the line its referencing the error is occuring on the line that does: Sys.Application.add_init(function().

When I comment out my Page_Init method the Telerik controls work just fine. 

How can I implement my Page_Init method without breaking Telerik?

Thanks!

No answers yet. Maybe you can help?

Tags
General Discussions
Asked by
Flea#
Top achievements
Rank 1
Share this question
or