472,354 Members | 2,083 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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
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""></
DisplayName("WebMenuBar"), _
ParseChildren(True, "MenuItems"), _
DefaultProperty("MenuItems"), _
Description("A menu control which acts like the menus in
applications"), _
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
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 = " &
Return m_List
End Get
End Property
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
OutputDebugString("GET: Public ReadOnly Property
WebMenuBar() As WebMenuBar")
Return m_WebMenuBar
End Get
End Property
Public ReadOnly Property WebMenuBar_MenuItem() As
If m_List.Count <= 0 Then
OutputDebugString("GET NEW: Private Property
WebMenuBar_MenuItem("") As WebMenuBar_MenuItem")
Return New WebMenuBar_MenuItem()
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
Nov 29 '07 #1
0 1292

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

Similar topics

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,...
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...
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...
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...
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...
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...
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...
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...
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...
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made but the http to https rule only works for...
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. header("Location:".$urlback); Is this the right layout the...
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and...
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and credentials and received a successful connection...
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...

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.