|
 |
aspx thread: Error creating web control
Message #1 by "Michael Clagett" <mclagett@n...> on Tue, 6 Mar 2001 23:12:39
|
|
I have been trying to create a custom web control with the C# Web Control
Library wizard. This generates a bare-bones control derived from the
System.Web.UI.WebControls.WebControl class. Everything works fine when I
first drag the control from the toolbox onto a web form. But when I save
the web form and reload, I always get an "Error creating web control"
message on my form. Any programming I do against the control still works
fine when I view the web form in a browser, but the control doesn't seem
to get created correctly on the IDE's web form design surface (nor does it
show up in the Properties viewer -- although the tag is still there for it
when I view the Web Form's HTML). The problem seems to be limited to
viewing the control in the IDE.
I've tried to create a few controls derived from
System.Web.UI.WebControls.WebControl, but this happens with all of them
(including, as I mentioned, the plain vanilla one generated with the C#
Web Control Library wizard.) This is driving me crazy, because I've been
able to do all sorts of neat things with a custom designer and custom
property editors and it all works great when I first create the custom
control. But since I can't get any of these controls (including the
wizard-generated one) to reload once the web forms have been saved, I
can't continue to use the design-time behavior that I'm working with.
Has anyone seen this problem and discovered any work around. This problem
has surfaced on two separate machines with the Beta 1 installation on it.
Message #2 by "Richard Anderson" <rja@a...> on Sat, 10 Mar 2001 12:37:31 -0000
|
|
This is a known problem in beta1 that will be fixed in beta2. For now, you
need to force VS to reload the control after you load your project.
Sometimes this can help:
1. switch between the html view and the design view and sometimes that kicks
it into action
2. Add and delete the reference to the control library.
HTH,
Rich
----- Original Message -----
From: "Michael Clagett" <mclagett@n...>
To: "ASP+" <aspx@p...>
Sent: Tuesday, March 06, 2001 11:12 PM
Subject: [aspx] Error creating web control
> I have been trying to create a custom web control with the C# Web Control
> Library wizard. This generates a bare-bones control derived from the
> System.Web.UI.WebControls.WebControl class. Everything works fine when I
> first drag the control from the toolbox onto a web form. But when I save
> the web form and reload, I always get an "Error creating web control"
> message on my form. Any programming I do against the control still works
> fine when I view the web form in a browser, but the control doesn't seem
> to get created correctly on the IDE's web form design surface (nor does it
> show up in the Properties viewer -- although the tag is still there for it
> when I view the Web Form's HTML). The problem seems to be limited to
> viewing the control in the IDE.
>
> I've tried to create a few controls derived from
> System.Web.UI.WebControls.WebControl, but this happens with all of them
> (including, as I mentioned, the plain vanilla one generated with the C#
> Web Control Library wizard.) This is driving me crazy, because I've been
> able to do all sorts of neat things with a custom designer and custom
> property editors and it all works great when I first create the custom
> control. But since I can't get any of these controls (including the
> wizard-generated one) to reload once the web forms have been saved, I
> can't continue to use the design-time behavior that I'm working with.
>
> Has anyone seen this problem and discovered any work around. This problem
> has surfaced on two separate machines with the Beta 1 installation on it.
>
>
>
Message #3 by "Belfield, Bill WL" <Bill.Belfield@a...> on Thu, 15 Mar 2001 09:00:10 -0000
|
|
Michael..
I have exactly the same problem, and this is by no means new, in the
old Interdev V6, you could not switch to Design view if you had any CRBs
(Code Render blocks, the <% %> delimiters, with the message "The editor is
unable to switch to Design view because there is script inside a <SELECT>
tag"
Hence, what I do when I create an ASPX form, is to drag all the
Server controls I want onto the form, set their properties and then handball
code the rest from the HTML view.
Obviously, the boys at Redmond have some work to do here, as many
developers will want a Design/Layout view that works !
Bill Belfield
Application Developer, UK Systems Team
Project Affirm Offices, F123 Regus 5300 Lakeside,
Cheadle Royal Business Park.
Tel (+44) 0161 246 6873
(mailto:bill.belfield@a...)
>
> 1. Error creating web control
>
> ----------------------------------------------------------------------
>
> Subject: Error creating web control
> From: "Michael Clagett" <mclagett@n...>
> Date: Tue, 6 Mar 2001 23:12:39
> X-Message-Number: 1
>
> I have been trying to create a custom web control with the C# Web Control
> Library wizard. This generates a bare-bones control derived from the
> System.Web.UI.WebControls.WebControl class. Everything works fine when I
> first drag the control from the toolbox onto a web form. But when I save
> the web form and reload, I always get an "Error creating web control"
> message on my form. Any programming I do against the control still works
> fine when I view the web form in a browser, but the control doesn't seem
> to get created correctly on the IDE's web form design surface (nor does it
>
> show up in the Properties viewer -- although the tag is still there for it
>
> when I view the Web Form's HTML). The problem seems to be limited to
> viewing the control in the IDE.
>
> I've tried to create a few controls derived from
> System.Web.UI.WebControls.WebControl, but this happens with all of them
> (including, as I mentioned, the plain vanilla one generated with the C#
> Web Control Library wizard.) This is driving me crazy, because I've been
> able to do all sorts of neat things with a custom designer and custom
> property editors and it all works great when I first create the custom
> control. But since I can't get any of these controls (including the
> wizard-generated one) to reload once the web forms have been saved, I
> can't continue to use the design-time behavior that I'm working with.
>
> Has anyone seen this problem and discovered any work around. This problem
>
> has surfaced on two separate machines with the Beta 1 installation on it.
>
>
|
|
 |