Dynamic UpdatePanel

  1. #1

    Dynamic UpdatePanel

    Hello,

    Whenever I try to create an UpdatePanel for my server control, I get a javascript error:

    Microsoft JScript runtime error: 'Sys' is undefined

    Any idea's on why this could be?

    Below are just some code snippets:



    
    protected Panel panel { get; set; }
    
    
    
    
    protected override void CreateChildControls()
    
    
    {
    
    
    base.CreateChildControls();
    
    
    up = new UpdatePanel();
    
    
    up.ID = "up";
    
    
    up.ContentTemplateContainer.Controls.Add(this.panel);
    
    
    base.Controls.Add(up);
    
    }
    Last edited by Daniil; Oct 20, 2011 at 2:01 PM. Reason: Please use [CODE] tags
  2. #2

    RE: Dynamic UpdatePanel



    While I finally got it to compile with an update panel, I don't understand why my control is completely refreshing.

    Any idea's on how I can just capture the selected event?
  3. #3

    RE: Dynamic UpdatePanel

    Hello..
    Actully I'm having the same problem; 'Sys' is Undefined. My code compiles fine but once the page is rendered it gives this error.Anyway, this is not a Coolite Problem, this is a Microsoft Ajax Problem. I need to ask you a question, did you create a normal website (NOT Ajax enabled) and then added the Ajax capability? if yes then add the following code within the <HttpHandlers> in the web.config file
    
    
    <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
    In order to see what the difference really is, compare the web.config of a website and an Ajax enabled website to see the difference. By the way, I'm using VS 2008.
  4. #4

    RE: Dynamic UpdatePanel

    Thank you for replying. What I did to fix it was take all my code out of the regular ASP site and made an AJAX site and then it worked fine. There are quite a few differences in the web.config file that I was missing.

Similar Threads

  1. UpdatePanel in UserControl
    By edudiana in forum 1.x Help
    Replies: 0
    Last Post: Apr 12, 2010, 4:56 PM
  2. UpdatePanel
    By Timothy in forum Open Discussions
    Replies: 20
    Last Post: Feb 11, 2010, 10:23 AM
  3. UpdatePanel bug
    By SouthDeveloper in forum 1.x Help
    Replies: 1
    Last Post: Oct 23, 2009, 4:18 PM
  4. UpdatePanel
    By Timothy in forum Bugs
    Replies: 2
    Last Post: Mar 03, 2009, 8:48 AM
  5. UpdatePanel problem
    By haltenberg in forum 1.x Help
    Replies: 2
    Last Post: Sep 28, 2008, 1:48 PM

Posting Permissions