473,511 Members | 15,197 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Web control library VS 2005 problems after switching from design viewto source view

Hi all,

i already posted this in dotnet.vb.controls but i need some help, so i
cant wait...

I have written a web control library and have some problems with it.
The Library contains only two Controls: a menu bar and a menu item
class which can have sub items (from the same class and type).
It also has a designer class which should show the control in design
time.
If i put the contron in design view on the page, everything works
(changing sizes,
adding MenuItems / Submenu items) and the data can be modified by
using the
VS Controls but if i switch to source view and back, all information
about the menuitems
are lost (but they still exist in the source view).
I have tryed to debug it, but it seams that the class will be
recreated and does not get
the information about the items and subitems, the list count is 0
after switching back to
design view.
here some code:
<ToolboxData("<{0}:WebMenuBar runat=""server""></
{0}:WebMenuBar>"),
_
DisplayName("WebMenuBar"), _
ParseChildren(True, "MenuItems"), _
DefaultProperty("MenuItems"), _
Description("A menu control which acts like the menus in
applications"), _
Designer(GetType(WebMenuBarDesigner))_
Public Class WebMenuBar
Inherits CompositeControl
----snip ----
Private m_List As List(Of WebMenuBar_MenuItem)
----- the property which gets the menu list
<Category("Data"), _
Description("MenuItems collection"), _
DesignerSerializationVisibility(DesignerSerializat ionVisibility.Content),
_
PersistenceMode(PersistenceMode.InnerDefaultProper ty)_
Public ReadOnly Property MenuItems() As List(Of
WebMenuBar_MenuItem)
Get
If m_List Is Nothing Then
m_List = New List(Of WebMenuBar_MenuItem)()
End If
OutputDebugString("GET: Public ReadOnly Property
WebMenuBar::MenuItems() As List(Of WebMenuBar_MenuItem) count = " &
m_List.Count.ToString())
Return m_List
End Get
End Property
---snip-----
VisualStudio also wants me that i create 2 functions with the name of
the class as propertys,
but i dont know for what and why, what should i return there ?:
Public ReadOnly Property WebMenuBar() As WebMenuBar
Get
OutputDebugString("GET: Public ReadOnly Property
WebMenuBar() As WebMenuBar")
Return m_WebMenuBar
End Get
End Property
Public ReadOnly Property WebMenuBar_MenuItem() As
WebMenuBar_MenuItem
Get
If m_List.Count <= 0 Then
OutputDebugString("GET NEW: Private Property
WebMenuBar_MenuItem("") As WebMenuBar_MenuItem")
Return New WebMenuBar_MenuItem()
Else
OutputDebugString("GET: Private Property
WebMenuBar_MenuItem("") As WebMenuBar_MenuItem")
Return m_List(0)
End If
End Get
End Property
Does anybody can help me ?
Kind regards
Christian
Nov 29 '07 #1
0 1375

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

Similar topics

0
1145
by: sdbranum | last post by:
I have been using Visual C#.NET to code a large project having many data adapters, data sets, datagrids, multiple forms with tab pages, each containing various controls (mostly label, text boxes,...
2
1787
by: Mehr H | last post by:
I have been working on this for several days and am still have had no success in achieving this. Pleae help. It seems that documentation for this is very limited. I have looked in several books and...
11
3184
by: Brian W | last post by:
Yet another editor problem To reproduce do the following 1) Open a Webform and switch to HTML edit mode 2) Enter the Following (include spaces) This is some text before <asp:hyperlink...
2
3157
by: Brian | last post by:
NOTE ALSO POSTED IN microsoft.public.dotnet.framework.aspnet.buildingcontrols I have solved most of my Server Control Collection property issues. I wrote an HTML page that describes all of the...
0
1138
by: Ziyad Makki | last post by:
Hello, I have created a Web Composite Control. I have also created a designer class that is used to render the control at design time. All though it dose work, I have been experiencing some...
1
2033
by: ATJaguarX | last post by:
I have an asp.net web application that I'm having problems with. Everytime I view certain pages in design mode, Sourcesafe asks me to check out the page because of requested changes. When I go to...
0
1325
by: Rene Aichinger | last post by:
Hi, I've created a server control (it inherits from WebControl) wich has a property of genertic collection type. The type of the generic collection is NavigationItem, a little class I've...
0
3915
by: tony | last post by:
Hello! This is a rather long mail but it's a very interesting one. I hope you read it. I have tried several times to get an answer to this mail but I have not get any answer saying something...
87
5024
by: Robert Seacord | last post by:
The SEI has published CMU/SEI-2006-TR-006 "Specifications for Managed Strings" and released a "proof-of-concept" implementation of the managed string library. The specification, source code for...
0
7137
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7417
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
7506
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...
1
5063
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4734
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...
0
3219
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3210
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
780
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
445
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.