telerik:RadWindowManager

3 posts, 0 answers
  1. Sushmita
    Sushmita avatar
    7 posts
    Member since:
    Nov 2012

    Posted 25 Apr 2013 Link to this post

    I have Master Page which is used by aspx page which is using ascx.

    MasterPage -> aspx Page -> ascx Page
     
    Master page contains 
    <telerik:RadWindowManager>
      <ConfirmTemplate>
         <style></style>
      </ConfirmTemplate>
    </telerik:RadWindowManager>

    ascx contains
    <telerik:RadWindowManager>
       <Windows>
         <telerik:RadWindow  OnClientShow = "wndChoiceShow"  OnClientClose = "wndChoiceClose"></telerik:RadWindow>
       </Windows>
    </telerik:RadWindowManager>

    Here, methods "wndChoiceShow" and "wndChoiceClose" are declared in JS file which is registered in Page_Init of ascx Page.

    When browser cache is cleared, load is giving error "wndChoiceShow and wndChoiceClose are undefined". After that error is not coming.
    Error is only coming first time after clearing the cache.

    When I moved the methods "wndChoiceShow" and "wndChoiceClose" in <telerik:RadScriptBlock> block of master page no error is coming.

    But this is not required. Need to have these methods in JS file only and should be registered in user control only.

    Please help to resolve the issue.

  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3598 posts

    Posted 26 Apr 2013 Link to this post

    Hi Sushmita,

    I would advise that you include the registration of the script file in the markup of the user control, e.g.
    <script type="text/javascript" src="paht_to_the_file"></script>

    Registering scripts from the code behind may not work with partial postbacks sometimes, especially if there is a check if the script has already been registered by the code. In this case the check will pass (the code thinks the script is registered), but the script is no longer in the browser because its cache has been cleared.


    Greetings,
    Marin Bratanov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Sushmita
    Sushmita avatar
    7 posts
    Member since:
    Nov 2012

    Posted 06 May 2013 Link to this post

    Hi Marin,


    Thanx for your reply. Issue is resolved. I added <telerik:RadScriptBlock> in UserControl and defined methods wndChoiceShow and wndChoiceClose inside this block. It is working fine.


    Sushmita

Back to Top