CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > windows_hosting.hosting_open_forum Tags:
Item Type: NewsGroup Date Entered: 7/20/2004 3:39:14 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 0 Views: 71 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
1 Items, 1 Pages 1 |< << Go >> >|
superconsultant
Asp.Net User
'' could not be set on property 'UserInfos'7/20/2004 3:39:14 PM

0/0


Edited by SomeNewKid. Please post code between <code> and </code> tags.



I have a control that has a property of type collection. When I add the control to the page
and add couple of items to collection property it runs fine with no problem. When I exit Visual Studio.NET and get back again the control's tag has error message Error Creating Control with tooltip saying " '' could not be set on property 'UserInfos' " how ever page still runs fine, but the problem is when tag has an error I can no longer edit its properties in property panel.

If you have any ideas please advice.

Bellow is the code for my control:

---------CONTROL CLASS---------------

Imports System.Web.UI

Imports System.ComponentModel

<ParseChildren(True, "UserInfos"), PersistChildren(False), _
PersistenceMode(PersistenceMode.InnerProperty), _
ToolboxData("<{0}:EmployeeControl runat=server></{0}:EmployeeControl>")> _
Public Class EmployeeControl
Inherits System.Web.UI.WebControls.WebControl

Private _userCollection As New UserCollection

<Category("Custom"), NotifyParentProperty(True), _
PersistenceMode(PersistenceMode.InnerDefaultProperty), _
DesignerSerializationVisibility(DesignerSerializationVisibility.Content)> _
Public Property UserInfos() As UserCollection
Get

Return _userCollection
End Get
Set(ByVal Value As UserCollection)
_userCollection = Value
End Set
End Property

End Class


-----------COLLECTION CLASS-----------------

Imports System.ComponentModel

Imports System.Web.UI

'<TypeConverter(GetType(ExpandableObjectConverter))> _
Public Class UserCollection
Inherits CollectionBase

Default Public Property Item(ByVal index As Integer) As UserInfo
Get
Return CType(List(index), UserInfo)
End Get
Set(ByVal Value As UserInfo)
List(index) = Value
End Set
End Property

Public Function Add(ByVal value As UserInfo) As Integer
Return List.Add(value)
End Function 'Add

Public Function IndexOf(ByVal value As UserInfo) As Integer
Return List.IndexOf(value)
End Function 'IndexOf

Public Sub Insert(ByVal index As Integer, ByVal value As UserInfo)
List.Insert(index, value)
End Sub 'Insert

Public Sub Remove(ByVal value As UserInfo)
List.Remove(value)
End Sub 'Remove
End Class


-------------TYPE CLASS----------------

Imports System.ComponentModel


Public Class UserInfo
Public strFirstName As String = ""
Public strLastName As String = ""
Public iUserId As Integer = 0

Property [FirstName]() As String
Get
Return strFirstName
End Get
Set(ByVal Value As String)
strFirstName = Value
End Set
End Property

Property [LastName]() As String
Get
Return strLastName
End Get
Set(ByVal Value As String)
strLastName = Value
End Set
End Property

Property [UserID]() As Integer 'UserIDCollection
Get
Return iUserId
End Get
Set(ByVal Value As Integer) 'UserIDCollection)
iUserId = Value
End Set
End Property
End Class


1 Items, 1 Pages 1 |< << Go >> >|


Free Download:


Web:
Custom Control With Multiple Properties of Collection Type - ASP ... Public Property UserInfos() As UserCollection .... and tooptip saying: '' could not be set on property 'UserInfos' and it still runs fine, ...
LINQ to SQL: Association error - ASP.NET Forums Could not find key member 'Id' of key 'Id' on type 'EntityRef`1'. The key may be wrong or the field or property on 'EntityRef`1' has changed ...
CodeProject: Data Access and Transaction Handling Framework. Free ... Command parameters are cached and only the values are set in the code (no ..... Could not create Framework.DataAccess.DataAccessSettingsHandler, Framework. ...
Transformers for HQL not support yet? (Hibernate3.2 dose ... Sep 16, 2008 ... var userInfos = s.CreateQuery("select u.Name, u.Email from User u") ... HibernateSystemException : Could not execute ...
Castle学习之二:处理主键时PrimaryKeyType.Assigned等几个有用的属性 ... set { _employees = value; } } 错误描述为: Could not guess relation type for property Dept.Employees 但是改为以下正确: [HasMany(typeof(Employee), ...
Transformers for HQL not support yet? (Hibernate3.2 dose ... string Email {get; set; }. } then you can do:. var userInfos = s.CreateQuery(" select u.Name, u. ... HibernateSystemException : Could not execute ...
Java Swing,Java Swing Tutorials,Swing Example Java,Online Swing ... //Create new instance of Contact and set //values in it by reading them from form object System.out.println("Inserting Record"); UserInfos user = new ...
CodeProject: Data Access and Transaction Handling Framework. Free ... The architecture is a long story and I will not go into its details. ..... I would be intrested if one of the gurus of this framework could compare notes. ...
Real's Howto Language If the property ends with ";I" which designates International, then the browser _probably_ does not. var encryption =. navigator.appName != 'Netscape' ? ...
struts+hibernate+spring多数据库提问- Struts - Java - JavaEye论坛 Hibernate: update BBSCS_BOARDS set BoardsName=?, BoardsEName=?, MainMaster=? ...... SettingsFactory]-[WARN] Could not obtain connection metadata ...




Search This Site:










accessing custom composite control layout properties

no <appsettings> section in my web.config

using dnn to redirect url to non dnn folder?

using hyperlinks

aspx pages won't work, not a normal problem...

resigning a web part?

remove email,security question from user wizard

cookies multiple values in

how to retain config setting while building a precompiled library of a web application?

callback problem

copy content inserts edits into original -> destroying original content

starting web applications in visual studio 2005 and asp.net v 2.0

template string parse with variables

win forms datagrid

enablesessionstate

anonymous access and page cannot be displayed

scheduling actions

abstract class in controls

[2.0] where is everybody

displaying data

difference between emulators and physical devices

problem with wsat using a remote web site

store module for 3.0?

problem with executing sql script

host provider is supposed to install 'member role scripts' ??

getting authenticated username and writing it to authuser in iis logfile

verisign payflowpro

conversion from asp.net 1.1 to 2.0 causing problems when opened as a website

webpartmanager, catch when a webpart is moving

initial dotnetnuke install from http://localhost/dotnetnuke

 
All Times Are GMT