+1-888-365-2779
Try Now
More in this section

Forums / 3.x Pre-release forums (retired) / Control not showing in view mode

Control not showing in view mode

4 posts, 0 answered
  1. Paul Berger
    Paul Berger avatar
    61 posts
    Registered:
    03 Apr 2006
    10 Apr 2007
    Link to this post
    Hi Guys

    I have a couple of usercontrols in a module. Most of showing ok but there is one that does not render. It renders in the admin area but not the live area. I have deleted and published the pages. Add the control to a new page. The page load fires sometimes, when I link to the page the event fires. When I navigate in the address bar the event does not fire.

    It has an AjaxPanel and AjaxLoadingPanel. I put a button on the page to see if it rendered that but it did not. Well it did in the admin page.

    Have you seen this before?
    An idea's where is came from?


  2. Rebecca
    Rebecca avatar
    536 posts
    Registered:
    24 Sep 2012
    10 Apr 2007
    Link to this post
    Hello Paul,

    Can you please send us your project where we can observe this behavior? Make sure you send us your user controls and the project database too. Please open a new support thread for this purpose.

    We are really sorry we could not help you immediately.
    Thank you for your cooperation in advance.

    All the best,
    Rebecca
    the telerik team

    Instantly find answers to your questions at the new telerik Support Center
  3. Paul Berger
    Paul Berger avatar
    61 posts
    Registered:
    03 Apr 2006
    12 Apr 2007
    Link to this post

    I took a while but I nailed it down. For some reason when I use the code

    CmsSiteMapProvider cmsSiteMap = new CmsSiteMapProvider();
    cmsSiteMap.CurrentNode.ToString().Equals("OhMyGod");

    It does not load any other controls in place holders beneath the offending placeholders.

    I think maybe there is some Exception occuring and you guys are eating it up.. Please try not to eat exceptions, it can be annoying...



  4. Bob
    Bob avatar
    330 posts
    Registered:
    24 Sep 2012
    12 Apr 2007
    Link to this post
    Hi Paul,

    We do not catch any exceptions except when controls render in design time (edit mode of page). This is needed because if a control throws an exception, there won’t be any way to remove the control form the page or change its properties to avoid the exception.

    Unfortunately, I’m unable to help in your case without having your code. The two lines of code you posted should not cause any problems though usually there is no need to create a new instance of SiteMapProvider. You can obtain a reference to the provider like this:

    SiteMapProvider provider = SiteMap.Providers["CmsSiteMapProvider"];


    A better way to get the current node would be to use SiteMap.CurrentNode which will retrieve the current node using the default provider.
    Note that there are situation where the CurrentNode property can return null reference. In RC1 the current node will be null for non-navigable pages and page templates. This issue has already been fixed.

    Regards,
    Bob
    the telerik team

    Instantly find answers to your questions at the new telerik Support Center
Register for webinar
4 posts, 0 answered