473,386 Members | 1,699 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,386 software developers and data experts.

composite & user control that contains a class

I am developing a composite & user control that contains a class and a struct
in a collection.

when i try to put values in them i get an error in design mode but the
control works fine when I execute the project.

How can i fix this? I think it has to do with the attributes but i'm not
sure.

here is the code of the control:

---------------------
1 [DefaultProperty("ColumnName")]
2 [ToolboxData("&lt;{0}:PanelForm runat=server></{0}:PanelForm>")]
3 public class PanelForm : Panel,PoentaListBasic
4 {
5 List _executeParam;
6 public List ExecuteParam
7 {
8 get
9 {
10 if (this._executeParam == null)
11 {
12 _executeParam = new List();
13 _executeParam.Add(new
ControlParam(this.SqlParameterName, this.SqlParamType, this.SqlParamSize,
this.ColumnValue, ParameterDirection.Input));
14 }
15
16
17 return _executeParam;
18 }
19 set
20 {
21 if (_executeParam == null)
22 _executeParam = new List();
23 _executeParam.AddRange(value);
24 }
25 }
26 }

1 public struct ControlParam
2 {
3 public ControlParam(string paramName)
4 {
5 this.paramName = paramName;
6
7 }
8
9 string paramName;
10 public string ParamName
11 {
12 get
13 {
14 return paramName;
15 }
16 set
17 {
18 paramName = value;
19 }
20 }
21 }
the error in the design says:

Error Creating Control - fieldPnl

Cannot create an object of type
'System.Collections.Generic.List'1[[ControlParam, Dal, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null]]' from its string representation
'(Collection)' for the 'ExecuteParam' property.
---------------------

and this is what i see on the page containing the control:

---------------------
po:PanelForm runat="server" ID="fieldPnl" ExecuteParam="(Collection)"
---------------------

Please advise...
Apr 19 '07 #1
0 852

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

Similar topics

3
by: Martin | last post by:
Hi, I have created a composite control that has a number of standard asp.net controls on it that can themselves cause postbacks. What i need to do in my composite control is to determine which...
0
by: AndrewF | last post by:
Hi there. I am royally stuck with this so any help would be greatly appreciated. Basically I have a set of classes that create composite controls for the user. One of these is an upload object...
1
by: shantanu_kush | last post by:
Hi there, I am using a DataList in a composite control. The DataList has an Custom ItemTemplate(ITemplate) which adds a Button to the DataList Item as shown in the code below : public class...
6
by: shapper | last post by:
Hello, I am working in a class library with various custom controls. In which cases should a control inherit Control, WebControl and CompositeControl classes? And when should a custom...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...

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.