By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,987 Members | 1,607 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,987 IT Pros & Developers. It's quick & easy.

composite & user control that contains a class

P: n/a
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
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.