WebpartManager is undefined

Last post 11-05-2007 5:26 AM by RichardPriddy. 3 replies.

Sort Posts:

  • WebpartManager is undefined

    02-08-2007, 10:42 AM

    Hello,

     I have built a very simple website which has a class that implements IHttpModule Which manages URL rewriting. I have one page Default.aspx that inherits from a master page which has on it 3 WebPart zones, a WebPart manager and 2 controls inside 2 of the 3 WebPartZones. When I remove the URL rewriting code I can easily logon go into design view and drag the controls around the page, minimize them etc... When I enable the URL rewriting I just get Javascript errors saying: WebPartManager is undefined and WebPartMenu is undefined.

    Any aid that can be given to why this might be happening would be appreciated.

    Richard Priddy

  • Re: WebpartManager is undefined

    02-12-2007, 4:24 AM

    I have finally fixed this problem!

    The issue is with WebResource.axd which seems to be a dynamically generated JavaScript file produced by ASP.NET The issue is with the URL rewriting it rewrites the path of this file as wel, so when the application runs it doesn’t include WebResources properly and cannot define WebPartManager/Menu. So the fix is to check that the file name when rewriting the URLs and ignore anything with WebResource.axd in the path.

    System.Web.

    HttpContext httpContext = HttpContext.Current;
    String currentURL = httpContext.Request.Path.ToLower();
    if (!currentURL.Contains("webresource.axd"))
    {
         /*URL ReWriting here*/
    }
  • Re: WebpartManager is undefined

    10-22-2007, 2:17 PM
    • Loading...
    • ErMasca
    • Joined on 02-20-2007, 12:59 PM
    • Barcelona - London
    • Posts 36

     Hi Richard!,

    could you be a extensive in your answer, i saw your post in the winsmarts, and i have the very same problem that you have.

    I am trying to make it work kind of got all ofuscated with it!!.

    Pleaseeee 

  • Re: WebpartManager is undefined

    11-05-2007, 5:26 AM

    Hello,

    Sorry I was not more detailed in my reply. Try reading through this post: http://forums.asp.net/t/966040.aspx and if that doesnt help just ask again.

     Richard Priddy

Page 1 of 1 (4 items)
Microsoft Communities
Page view counter