473,414 Members | 1,946 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

Web Custom control question

Hello,
Framework: NET 1.1, Language VB

So I am going through the basic walkthrough example in .NET on how to create
a simple custom control. Takes about 2 minutes and when done I have a DLL
that I can add to a toolbox in Web app.

Problem is, once the control is in my toolbox I cannot drag it onto a web
page!!! I get the dreaded 'O' with a line through it. I also tried in HTML
view but when I switch to Design view I get a box displaying 'Error Creating
Control'.

What am I missing or doing wrong???

Thanks - Hedge
Jun 22 '06 #1
2 1459
Hi Tony,

Create an empty class that derives from System.Web.UI.Control and you've
made a custom control, although it doesn't do anything special.

public class MyControl : System.Web.UI.Control
{
}

Now, does your empty Control appear in the Toolbox? If not, add your .dll
to the Toolbox by browsing to your assembly on the .NET tab of the toolbox
customization dialog. Your assembly will not be listed so you must browse
for it.
Can you use it on a web form by dragging the Control from the Toolbox and
dropping it onto the Form?

What have you done in your custom control other than just deriving from
System.Web.UI.Control?
"Tony Hedge" <To*******@discussions.microsoft.com> wrote in message
news:AC**********************************@microsof t.com...
Hello,
Framework: NET 1.1, Language VB

So I am going through the basic walkthrough example in .NET on how to
create
a simple custom control. Takes about 2 minutes and when done I have a DLL
that I can add to a toolbox in Web app.

Problem is, once the control is in my toolbox I cannot drag it onto a web
page!!! I get the dreaded 'O' with a line through it. I also tried in
HTML
view but when I switch to Design view I get a box displaying 'Error
Creating
Control'.

What am I missing or doing wrong???

Thanks - Hedge

Jun 23 '06 #2
Hi Dave,

I've changed nothing, that's what's puzzling.

It does appear in the toolbox, it's when I go to drag in on a form that's
the problem.

As I'm dragging the control from the toolbox to the form, the cursor changes
to the O with the slash through it as soon as I cross the boundary from the
Toolbox to the form.

"Dave Sexton" wrote:
Hi Tony,

Create an empty class that derives from System.Web.UI.Control and you've
made a custom control, although it doesn't do anything special.

public class MyControl : System.Web.UI.Control
{
}

Now, does your empty Control appear in the Toolbox? If not, add your .dll
to the Toolbox by browsing to your assembly on the .NET tab of the toolbox
customization dialog. Your assembly will not be listed so you must browse
for it.
Can you use it on a web form by dragging the Control from the Toolbox and
dropping it onto the Form?

What have you done in your custom control other than just deriving from
System.Web.UI.Control?
"Tony Hedge" <To*******@discussions.microsoft.com> wrote in message
news:AC**********************************@microsof t.com...
Hello,
Framework: NET 1.1, Language VB

So I am going through the basic walkthrough example in .NET on how to
create
a simple custom control. Takes about 2 minutes and when done I have a DLL
that I can add to a toolbox in Web app.

Problem is, once the control is in my toolbox I cannot drag it onto a web
page!!! I get the dreaded 'O' with a line through it. I also tried in
HTML
view but when I switch to Design view I get a box displaying 'Error
Creating
Control'.

What am I missing or doing wrong???

Thanks - Hedge


Jun 24 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Tinus | last post by:
Hello all, I've create a custom control (UserControl) and have a custom Item Collection. The control is a custom calendar which is draw using the Graphics Rectangle etc. functions. It is drawn...
21
by: One Handed Man \( OHM - Terry Burns \) | last post by:
When using a custom control. In order to check and see if values have changed one has to implement the IPostBackDataCollection interface. The values returned for the control seem to be simply a...
2
by: Suzanne | last post by:
Hi all, I'm reposting this message as I'm experiencing this problem more and more frequently : I really hope someone out there can help me as I've been tearing my hair out on this one for a...
8
by: Umut Tezduyar | last post by:
I know that, in asp.net 2.0, the assembly for the web site is splitted into pieces and each time you build it, it generates a random name for assembly. My question is, if i create a custom web...
2
by: J R M | last post by:
I've developed a custom control (it's basically a drop-down list and then a couple of textboxes to include meta-data for the selection) that I'm embedding into another custom control (the idea is...
2
by: Laurent Bugnion | last post by:
Hi, I like to develop custom controls for a number of webpages. These controls are often customizable, so that they can be reused in a number of situations. My question is: What is the best...
14
by: Rolf Welskes | last post by:
Hello, I have an ObjectDataSource which has as business-object a simple array of strings. No problem. I have an own (custom) control to which I give the DataSourceId and in the custom-control...
1
by: rn5a | last post by:
I want to create a custom control that encapsulates a Button & a TextBox. When the Button is clicked, the user is asked a question using JavaScript confirm (which shows 2 buttons - 'OK' &...
15
by: rizwanahmed24 | last post by:
Hello i have made a custom control. i have placed a panel on it. I want this panel to behave just like the normal panel. The problem i was having is that the panel on my custom control doesnt...
4
by: =?Utf-8?B?UmljaEI=?= | last post by:
I am trying to create a project using the ASP.NET AJAX accordion control. I would like to dynamically add panes to the control with a form template added when the pane is added. I have tried...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.