473,788 Members | 2,754 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.contr ols 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("We bMenuBar"), _
ParseChildren(T rue, "MenuItems" ), _
DefaultProperty ("MenuItems" ), _
Description("A menu control which acts like the menus in
applications"), _
Designer(GetTyp e(WebMenuBarDes igner))_
Public Class WebMenuBar
Inherits CompositeContro l
----snip ----
Private m_List As List(Of WebMenuBar_Menu Item)
----- the property which gets the menu list
<Category("Data "), _
Description("Me nuItems collection"), _
DesignerSeriali zationVisibilit y(DesignerSeria lizationVisibil ity.Content),
_
PersistenceMode (PersistenceMod e.InnerDefaultP roperty)_
Public ReadOnly Property MenuItems() As List(Of
WebMenuBar_Menu Item)
Get
If m_List Is Nothing Then
m_List = New List(Of WebMenuBar_Menu Item)()
End If
OutputDebugStri ng("GET: Public ReadOnly Property
WebMenuBar::Men uItems() As List(Of WebMenuBar_Menu Item) count = " &
m_List.Count.To String())
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
OutputDebugStri ng("GET: Public ReadOnly Property
WebMenuBar() As WebMenuBar")
Return m_WebMenuBar
End Get
End Property
Public ReadOnly Property WebMenuBar_Menu Item() As
WebMenuBar_Menu Item
Get
If m_List.Count <= 0 Then
OutputDebugStri ng("GET NEW: Private Property
WebMenuBar_Menu Item("") As WebMenuBar_Menu Item")
Return New WebMenuBar_Menu Item()
Else
OutputDebugStri ng("GET: Private Property
WebMenuBar_Menu Item("") As WebMenuBar_Menu Item")
Return m_List(0)
End If
End Get
End Property
Does anybody can help me ?
Kind regards
Christian
Nov 29 '07 #1
0 1400

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

Similar topics

0
1156
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, check boxes, date pickers, combo boxes and datagrids). I have been coding alone on this project for about a year, and I have experienced many problems which have not been addressed by various SP's, including the recent SP1 to Framework.NET 1.1,...
2
1798
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 they all seem to say either nothing about this or that this is "out of the scope of this book", even "Professional ASP.NET". I have a ActiveX component that I'd like to expose through a .NET wrapper so in the case that a client browses to my...
11
3228
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 id="hl1" runat="server " navigateurl="http://www.microsoft.com">This is my link</asp:hyperlink> And this is my text after the Hyperlink
2
3183
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 problems that I have encountered to date and the solutions (if any) that I found. http://users.adelphia.net/~brianpclab/ServerControlCollectionIssues.htm This page also has all of the source code in a compressed file that you are free to download...
0
1151
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 strange behaviour with the control. The following steps describe what I'm doing to cause the problem. * After dragging and dropping the control onto my page. I change some of the properties of the control. This is done using the property window. *...
1
2046
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 view the page in design mode, .Net is switching the user control registration tag with the page language tag. Example: <%@ Page Language="vb" AutoEventWireup="false" Codebehind="Tile.aspx.vb" Inherits="TilePriceTag"%>
0
1344
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 created... The declaration of the collection property is that:
0
3937
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 like this is a bug or that .NET doesn't support what I trying to do. I hope that one that is is microsoft certified read this because this must be a bug.
87
5168
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 the library, and other resources related to managed strings are available for download from the CERT web site at: http://www.cert.org/secure-coding/managedstring.html
0
9656
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9498
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10366
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9969
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7518
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6750
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5399
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3675
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.