473,326 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Why the designer doesn't persist the property of my control? (Advanced)

I have build a sample control but the designer doesn't communicate it to
parse the childen. Please if you are an control developer, spend your 10
minutes to solve my problem.

The main problem is, whenever i made a change in the sub object (Tab) it
doesn't persist the changes to the asp.net page.

Here is the code sample:

---------- Asp Page ----------------

<form id="Form1" method="post" runat="server">
<cc1:Umut runat="server" id="umut1ew">
<Tab name="main">
<Tabs>
<cc1:Tab name="sub1"/>
<cc1:Tab name="sub2"/>
</Tabs>
</Tab>
</cc1:Umut>
</form>

--------------------------------------


[
System.ComponentModel.TypeConverter(typeof(System. ComponentModel.ExpandableObjectConverter)), System.Web.UI.ControlBuilder(typeof(System.Web.UI. ControlBuilder)) ] public class Tab { private ArrayList _tabs; private string _name; public Tab() { } [ System.Web.UI.PersistenceMode(System.Web.UI.Persis tenceMode.InnerProperty) ] public ArrayList Tabs { get { if (this._tabs == null) this._tabs = new System.Collections.ArrayList(); return this._tabs; } set { this._tabs = value; } } [ System.Web.UI.PersistenceMode(System.Web.UI.Persis tenceMode.Attribute) ] public string Name { get { return this._name; } set { this._name = value; } } } [ System.ComponentModel.Designer(typeof(System.Web.U I.Design.ControlDesigner)), System.Web.UI.ParseChildren(true) ] public class Umut : System.Web.UI.Control { private Tab _tab; public Tab Tab { get { if (this._tab == null) { this._tab = new Tab(); this._tab.Name = "Default"; } return this._tab; } set { this._tab = value; } } protected override void Render(System.Web.UI.HtmlTextWriter writer) { this.RenderTab (writer, this.Tab); } private void RenderTab(System.Web.UI.HtmlTextWriter writer, Tab tab) { writer.Write (string.Format (">>Tab name={0}<br>", tab.Name)); foreach (Tab t in tab.Tabs) this.RenderTab (writer, t); } }

Dec 2 '05 #1
0 987

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

Similar topics

1
by: bullshark | last post by:
VS2003 1) If you don't have one, add a tooltip control to your design canvas. 2) open the properties for the control that gets the tool tip 3) type in all your text in the 'tooltip on tooltip1'...
7
by: Martin Schulze | last post by:
Hello, i tried to compose myself a custom usercontrol which is derieved from System.Windows.Forms.UserControl. It contains 2 comboboxes and one textbox (which are also custom controls, but...
0
by: Vincent Finn | last post by:
Hi, I have a user control and I want an array of items to be available to the user In my case these items are a class called Needle. I added a property called Needles to get\set the array...
1
by: David Veeneman | last post by:
How do I persist properties bound to application settings in the VS 2005 Designer? I am binding form and control properties to application settings using VS 2005, as explained in MSDN: ...
2
by: Jay Douglas | last post by:
I have various different web user controls through out my web application. I would like to view the properties/fields for these user controls in the designer property window .... For instance:...
19
by: Dales | last post by:
I have a custom control that builds what we refer to as "Formlets" around some content in a page. These are basically content "wrapper" sections that are tables that have a colored header and...
0
by: Ken Dopierala Jr. | last post by:
Hi, When I change properties through the property window on my custom control and then move focus from that property cell VS.Net runs the GetDesignTimeHtml() method on my designer. When I...
0
by: Umut Tezduyar | last post by:
I have build a sample control but the designer doesn't communicate with it to parse the childen property. Please if you are an control developer, spend your 10 minutes to solve my problem. I have...
6
by: =?Utf-8?B?bWljaGFlbCBzb3JlbnM=?= | last post by:
Yesterday Visual Studio gave me a strange error both at compiletime and at designtime that had no obvious connection to anything I had changed recently. After some effort tracking down the problem...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.