CodeVerge.Net Beta


   Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > Asp.Net Forum > windows_hosting.hosting_open_forum Tags:
Item Type: Date Entered: 10/6/2005 10:31:27 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 3 Views: 107 Favorited: 0 Favorite
4 Items, 1 Pages 1 |< << Go >> >|
"timgaunt" <>
NewsGroup User
Error Creating Control issue10/6/2005 10:31:27 AM

0

Hi,

I've had a good search around but can't seem to find the issue with this. I've made a little breadcrumb system for the top of our pages which is generated from a collection. Until yesterday it was working fine but suddenly (and to my knowledge without a change in the code) its stopped rendering in the Design Time view of visual studio with the error "Error Creating Control". Here's my code (some omitted for brevity). Can anyone see what?s wrong?

Thanks.

Tim

using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.ComponentModel;
using Common.Geographics;
using System.Collections;
using Data.Constants;
 
namespace NavigationControls
{
      /// <summary>
      /// Generates a breadcrumb system of the current location
      /// </summary>
      [
      DefaultProperty("Text"),
      ToolboxData("<{0}:AreaBreadCrumbs runat=server></{0}:AreaBreadCrumbs>"),
      Designer("NavigationControls.wcAreaBreadCrumbsDesigner, GeneralControls")
      ]
      public class AreaBreadCrumbs : System.Web.UI.WebControls.WebControl
      {
            /// <summary>
            /// strRender is set to display links Design View.
            /// </summary>
            private string strRender = "<a>Home</a> > <a>Level 1</a> > <a>Level 2</a> > <a>Level 3</a>";
            private string strNoRender = "Not Visible at Runtime with Current Settings";
 
            [
            Bindable(true),
            Category("Custom"),
            DefaultValue(""),
            Description("Set the Design View Render HTML String")
            ]
            public string RenderHTML
            {
                  get
                  {
                        return strRender;
                  }
 
                  set
                  {
                        strRender = value;
                  }
            }
 
            [
            Bindable(true),
            Category("Custom"),
            DefaultValue(""),
            Description("Set the Design View NoRender HTML String")
            ]
            public string NoRenderHTML
            {
                  get
                  {
                        return strNoRender;
                  }
 
                  set
                  {
                        strNoRender = value;
                  }
            }
 
 
            protected override void CreateChildControls()
            {
                  //Code ommitted              
            }
      }
 
      /// <summary>
      /// Summary description for wcCountryCodeControlDesigner.
      /// </summary>
      public class wcAreaBreadCrumbsDesigner : System.Web.UI.Design.ControlDesigner
      {
            public override string GetDesignTimeHtml()
            {
                  //cast the underlying Component to a AreaBreadCrumbs
                  //so that we have access to the design time Property - RenderHTML
                  AreaBreadCrumbs bc = (AreaBreadCrumbs)Component;
                  return bc.RenderHTML;
            }
            protected override string GetEmptyDesignTimeHtml()
            {
                  //cast the underlying Component to a CountryCodeDropDownList
                  //so that we have access to the design time Property - NoRenderHTML
                  AreaBreadCrumbs bc = (AreaBreadCrumbs) Component;
                  return CreatePlaceHolderDesignTimeHtml(bc.NoRenderHTML);
            }
      }
}

"PLBlum" <>
NewsGroup User
Re: Error Creating Control issue10/6/2005 6:30:33 PM

0

1. Start by pointing to the (!) icon. It should give a tooltip that contains the error message (from the Exception thrown). That should help.

2. Run the page. Do you get an exception? If so, it may be the same problem and give you a stack trace to assist you. In addition, if you have a debugger (you SHOULD have one), you can use it to track down the cause.
--- Peter Blum
Creator of Professional Validation And More Suite, Peter's Date Package, and Peter's Polling Package
www.PeterBlum.com
"timgaunt" <>
NewsGroup User
Re: Error Creating Control issue10/6/2005 6:42:37 PM

0

Hi Peter,

Thanks for your response however I perhaps wasn't clear, the issue is in Visual Studio's Design time view, the control loads without a problem and there is no exception thrown.

I don't beleive I can debug it if its not actually running but please feel free to correct me if I'm wrong.

Tim
"PLBlum" <>
NewsGroup User
Re: Error Creating Control issue10/6/2005 10:24:33 PM

0

Its quite possible to debug design mode. In fact, I do it regularly.

1. Open VS.NET and open your project.
2. Setup breakpoints in the code related to design mode if you have a clue where to debug
3. Enable "Break into the debugger" for exceptions. Debug menu; Exceptions; Common Runtime Language Exceptions (all of them)
4. Open a second instance of VS.NET. Don't open a project yet.
5. Return to the first VS.NET. Choose Debug; Processes.
6. Attach to "devenv.exe". This is the other instance of VS.NET. Close the Processes window.
7. Return to the second VS.NET and open your project.
8. Open a web form with the problem in design mode.
You will hit the breakpoint or stop on an exception.
--- Peter Blum
Creator of Professional Validation And More Suite, Peter's Date Package, and Peter's Polling Package
www.PeterBlum.com
4 Items, 1 Pages 1 |< << Go >> >|


Free Download:













can a class know if it's being inherited?

property lists

webhost supporting crystal reports

hosting asp.net

asp.net hosting

using a component class as a property for a custom control

usercontrol

find out if a user is still connected

user accounts for the managed hosting employees on client machines

services provider license agreement

how refresh control dll

looking for a free asp.net 2.0 webhost

raising event in custom control

more dynamic fun!

the custom control works fine, but hard to work with in vs 2003 design mode

hosting for asp.net + mql

custom controls and code render blocks

how can i add web user control ?

viewstate for composite control's children

controls reading from db

controlbuilder/parser question

please help with double buffering

datagridcolumncollection in aspx source

are there any known performance issues about asp.net 2.0 and windows 2000?

adding control to custom control

multiple domains with webhost4life

custom control - onkeypress event

vps plan recommendations

how to place different user controls in specific place within html

eworld.ui.numericbox + datagrid server control

license and registration

hosting a website on xp pro using iis

creating a new control

custom control with hierarchal tags structure

shared ssl

dynamic controls, placeholder, retrieve information from dynamic controls

rendering the stylesheet class

looking for providers that will help our customer install our software?

has anyone got any experience with unitspeed for hosting?

orders of events and late data binding... i think im missing something obvious!

do you know any free hosting provider?

sql server process maxing processor

pulling image data from sql server 7 to an image control

toolbox icon - stuck with just one?

need a new webhost ...i think

aspnix problems?

viewstate in templated usercontrol

persisting simple custom class

outlook web 2003 controls.

problems with viewstate

   
  Privacy | Contact Us
All Times Are GMT