Try Now
More in this section

Forums / Developing with Sitefinity / Admin edit page problems

Admin edit page problems

2 posts, 0 answered
  1. Bruno Michels
    Bruno Michels avatar
    125 posts
    16 Apr 2010
    23 Jul 2010
    Link to this post
    I have a control that is using Page.LoadControl, but in the edit page on the admin the control crashes and says:

    Error Rendering Control - Control 'id' of type 'TextBox' must be placed inside a form tag with runat=server

    The control works normal on the page, but in the admin it crashes like that, how can I fix it?
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    12 Sep 2017
    23 Jul 2010
    Link to this post
    Hello Bruno Michels,

    In page edit mode Page is null and most probably this is the issue. You can escape the logic you have added only in edit mode and stop showing the error message by using the QueryString

    if(HttpContext.Current.Request.QueryString[ "cmspagemode"] == "edit")
           //here disable RadMenu scripts

    another option

    if("edit".Equals(HttpContext.Current.Items["cmspagemode"] as string))

    or implement IEmptyControntrol interface.

    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
2 posts, 0 answered