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: 5/17/2004 3:39:04 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 4 Views: 25 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
5 Items, 1 Pages 1 |< << Go >> >|
majeluk
Asp.Net User
Disappering child controls and content.5/17/2004 3:39:04 AM

0/0

My very simple custom control iherits from System.Web.UI.Control. This control acts like a container for other controls and text. It is like a bit more sophisiticated Panel control, basically only the RenderBeginTag and RenderEndTag are overwritten. Now I want to consume the control, so I throw in some text or controls inbetween the control's begin and end tags (in html editor). All fine. Now I change a property of this control, and when I come back to the html editor, all the previous content of the control is gone. Why??? The only metadata about my control is:

ParseChildren(false) and PersistChildren (true)

I know Panel does it somehow.

Also, do you know if it is possible to achieve the functionality that when working id designer mode one could just drag and drop some other controls (labels, grids, etc) into my control and even edit them (and not have to do it manually in html)? Just like Panel lets you do it.

Any comments and/or references are appreciated.

Thanx.
hlaford
Asp.Net User
Re: Disappering child controls and content.5/18/2004 12:07:29 AM

0/0

i'd prefer to see some sample code (of the control, not its consumption) to resolve the first part. as for editing control contents in design mode: you'll need to use a ReadWriteControlDesigner. I have yet to see it done well enough to use. I'm hoping that there are some examples for it in 2.0 since it's an essential part of making the designer useful.

http://www.developersdex.com/asp/message.asp?r=2719059&p=2906
AndrewSeven
Asp.Net User
Re: Disappering child controls and content.5/21/2004 4:44:58 PM

0/0

Is there a reason that you don't want to inherit from Panel?
majeluk
Asp.Net User
Re: Disappering child controls and content.5/21/2004 4:59:26 PM

0/0

Thanx for the suggestion. However the code from online resource did not even compile; there was a problem with line:

mshtml.IHTMLElement e;

Am I missing some reference???

I did solve my main problem partially. To preserve all the functionality of Panel control, I made my new control iherit from Panel. This preserved all the basic style properties as well as the drag and drop functionality. The only customization I made was overriding the RenderBeginTag and RenderEndTag of the Panel base class. This achieved almost everything I was aming at. There two more features I am still trying to implement.

1. In generall. I want to add a property to my control, let's say an int. I have it all coded and it works fine but this new property looks different from the standard properties in the properties pane in vs.net. It is bold and it is always populatad with some value. I am trying to make it bahave like for example the Width propertie - initially it is blank (not specified), but when value is entered it becomes bold.

2. The design view of my control in vs.net is still the same as with the regular Panel, but now my control renders differently in aspx. How can I change my control's look in design to reflect the result of rendering on a page, and at the same time keep the drag and drop functionality. From what I have read so far this is not really supported since the Designer has to inherit from either ComponentDesigner (allows to create custom design view but no drag and drop) or ReadWriteControlDesigner (drag and drop but no custom design view). Please share your experiences.

Thanx again for your help.



majeluk
Asp.Net User
Re: Disappering child controls and content.5/21/2004 5:20:25 PM

0/0

Sorry, I posted my message not knowing about your post.
5 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Disappearing Acts: Spectacles of Gender and Nationalism in Argentina's "dirty War" Authors: Diana Taylor, Pages: 309, Published: 1997
Handbook of Early Childhood Intervention Authors: Jack P. Shonkoff, Samuel J. Meisels, Pages: 734, Published: 2000
Our Sexuality Authors: Robert Crooks, Karla Baur, Pages: 680, Published: 1995

Web:
CodeProject: Just another C# Collapsing Group Control. Free source ... Formula-editor for editing and exporting mathematical content .... General, Disappearing child controls, suss, Rakker789, 11:53 29 Jun '04 ...
Disappearing Microbiota: Helicobacter pylori Protection against ... Microbial species and their gene content, as well as transcripts ... Evidence that cagA(+) Helicobacter pylori strains are disappearing more rapidly than ...
Chinese Law and Politics Blog: Is The Hukou System Really ... Mar 13, 2007 ... And since hukou status is inherited, children of low-wage migrants can be ... of public order by implementing better controls over renters. ...
XBL Task Force Issue: Unmatched children Proposal 1: If an explicit child of the bound element does not match any of the content elements (or if there are no content elements in the shadow tree), ...
Case of the disappearing dads - General - News - smh.com.au Thirty-four per cent of the 40-plus men who had no children still wanted to be ... Epigenetics "controls how tightly your DNA is packed", O'Bryan explains. ...
Dell Taking On iPod Again? Thank/Blame Disappearing DRM* Jul 30, 2008 ... Dell Taking On iPod Again? Thank/Blame Disappearing DRM* .... Your less rational , largely unconscious "inner child" detests nothing more ...
CodeProject: A panel control with positionable captions and icon ... I tried using similar controls in one of my projects, and found that the caption header was disappearing the moment I changed the docking style of child ...
MasterPage in V4: How it works - Using own controls with umbraco ... we declared a child template as u said,but the content or description ... code it is disappearing after saving the template successfully. ...
America's Disappearing 'Upper Class' | Corporate Accountability ... The "fair" tax is the ugly step child of Milton Friedman Posted by: ... That plays at Bohemian Grove, that controls the content of the media ...
How English as we know it is disappearing ... to be replaced by ... Mar 27, 2008 ... Disappearing act: The invisibility cloak that will be ready in five years ... Full steam ahead: Our science editor takes the controls of the ...




Search This Site:










error messages

could not load container:

css styles and skins

start options

how bad...my vs 2005 is expired

db paswords and user names

asp.net configuration

how to add values in radio button list

new web service project solution file location

contest signup module?

custom 404 page and vb

very strange error: signature is not image_cee_cs_callconv_local_sig

.net, formatting,checkboxlists aka make listitem invisible...

validations

regularexpression in c# custom control, help!

problem after logout

containercontroldesigner for my 2 table cells

asp.net rss aggregator

can't change control id

request.servervariables not being returned

pwsk from http://willyd.ca/default.aspx

visual studio 2005 problem

very newbie and easy question (using vs.net)

container-skins are only visible after login

deploy completely precompiled?

[dnn212] user keeps timing out in subportal

deploying dll's, not modules..

dynamic menu

msgbox ?

need advice for security strategy

 
All Times Are GMT